Show progress dialog during startup (#9255)

* Show progress dialog during startup for selection enumeration that can take a long time.

* Updated with better code organization and a timer to ensure the progress dialog does not appear in most cases.

* Update based on PR feedback

* Change progress dialog delay from 1500ms to 2500ms

* Move progress dialog invocation off the main UI thread

Co-authored-by: Chris Davis (EDGE) <chrdavis@microsoft.com>
This commit is contained in:
Chris Davis
2021-04-02 03:07:12 -07:00
committed by GitHub
parent 6613522e53
commit d128939227
12 changed files with 463 additions and 106 deletions

View File

@@ -7,7 +7,7 @@ HRESULT GetTransformedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR sour
HRESULT GetDatedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR source, SYSTEMTIME fileTime);
bool isFileTimeUsed(_In_ PCWSTR source);
bool DataObjectContainsRenamableItem(_In_ IUnknown* dataSource);
HRESULT EnumerateDataObject(_In_ IUnknown* pdo, _In_ IPowerRenameManager* psrm);
HRESULT GetShellItemArrayFromDataObject(_In_ IUnknown* dataSource, _COM_Outptr_ IShellItemArray** items);
BOOL GetEnumeratedFileName(
__out_ecount(cchMax) PWSTR pszUniqueName,
UINT cchMax,
@@ -15,3 +15,4 @@ BOOL GetEnumeratedFileName(
__in_opt PCWSTR pszDir,
unsigned long ulMinLong,
__inout unsigned long* pulNumUsed);
HWND CreateMsgWindow(_In_ HINSTANCE hInst, _In_ WNDPROC pfnWndProc, _In_ void* p);