-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgui.h
More file actions
48 lines (39 loc) · 1.23 KB
/
gui.h
File metadata and controls
48 lines (39 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//? Marius Negrutiu (marius.negrutiu@protonmail.com) :: 2014/10/25
#pragma once
typedef enum {
GUI_MODE_SILENT,
GUI_MODE_POPUP,
GUI_MODE_PAGE
} GUI_MODE;
typedef struct _GUI_WAIT_PARAM {
UINT iID; /// Can be ANY_REQUEST_ID
ULONG iPriority; /// Can be ANY_PRIORITY
GUI_MODE iMode;
HWND hTitleWnd; /// Can be NULL
HWND hStatusWnd; /// Can be NULL
HWND hProgressWnd; /// Can be NULL
LPCTSTR pszTitleText; /// Can be NULL
LPCTSTR pszTitleMultiText; /// Can be NULL
LPCTSTR pszStatusText; /// Can be NULL
LPCTSTR pszStatusMultiText; /// Can be NULL
BOOLEAN bAbort;
LPCTSTR pszAbortTitle; /// Can be NULL
LPCTSTR pszAbortMsg; /// Can be NULL
} GUI_WAIT_PARAM, *PGUI_WAIT_PARAM;
#define GuiWaitParamInit(Wait) \
MyZeroMemory( &Wait, sizeof( Wait ) ); \
Wait.iID = ANY_REQUEST_ID; \
Wait.iPriority = ANY_PRIORITY; \
Wait.iMode = GUI_MODE_PAGE;
#define GuiWaitParamDestroy(Wait) \
MyFree( Wait.pszTitleText ); \
MyFree( Wait.pszTitleMultiText ); \
MyFree( Wait.pszStatusText ); \
MyFree( Wait.pszStatusMultiText ); \
MyFree( Wait.pszAbortTitle ); \
MyFree( Wait.pszAbortMsg ); \
MyZeroMemory( &Wait, sizeof( Wait ) );
/// Returns Win32 error code
ULONG GuiWait(
__in PGUI_WAIT_PARAM pParam
);