PowerToys/src/modules/powerrename/lib/Helpers.h
Chris Davis d128939227
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>
2021-04-02 12:07:12 +02:00

19 lines
845 B
C

#pragma once
#include <lib/PowerRenameInterfaces.h>
HRESULT GetTrimmedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR source);
HRESULT GetTransformedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR source, DWORD flags);
HRESULT GetDatedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR source, SYSTEMTIME fileTime);
bool isFileTimeUsed(_In_ PCWSTR source);
bool DataObjectContainsRenamableItem(_In_ IUnknown* dataSource);
HRESULT GetShellItemArrayFromDataObject(_In_ IUnknown* dataSource, _COM_Outptr_ IShellItemArray** items);
BOOL GetEnumeratedFileName(
__out_ecount(cchMax) PWSTR pszUniqueName,
UINT cchMax,
__in PCWSTR pszTemplate,
__in_opt PCWSTR pszDir,
unsigned long ulMinLong,
__inout unsigned long* pulNumUsed);
HWND CreateMsgWindow(_In_ HINSTANCE hInst, _In_ WNDPROC pfnWndProc, _In_ void* p);