ReactOS 0.4.16-dev-306-g647d351
hotplug.c
Go to the documentation of this file.
1/*
2 * PROJECT: Safely Remove Hardware Applet
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Applet initialization
5 * COPYRIGHT: Copyright 2013 Johannes Anderwald <johannes.anderwald@reactos.org>
6 * Copyright 2020 Eric Kohl <eric.kohl@reactos.org>
7 */
8
9#include "hotplug.h"
10
11#define NDEBUG
12#include <debug.h>
13
14// globals
16
17/* Applets */
19{
21};
22
23static
26{
27 HKEY hKey = NULL;
28 DWORD dwFlags = 0;
29 DWORD dwSize, dwError;
30
33 0,
35 &hKey);
36 if (dwError != ERROR_SUCCESS)
37 goto done;
38
39 dwSize = sizeof(dwFlags);
40 dwError = RegQueryValueExW(hKey,
41 L"HotPlugFlags",
42 NULL,
43 NULL,
45 &dwSize);
46 if (dwError != ERROR_SUCCESS)
47 dwFlags = 0;
48
49done:
50 if (hKey != NULL)
52
53 return dwFlags;
54}
55
56static
60{
61 HKEY hKey = NULL;
62 DWORD dwError;
63
66 0,
67 NULL,
70 NULL,
71 &hKey,
72 NULL);
73 if (dwError != ERROR_SUCCESS)
74 goto done;
75
76 dwError = RegSetValueExW(hKey,
77 L"HotPlugFlags",
78 0,
81 sizeof(dwFlags));
82
83done:
84 if (hKey != NULL)
86
87 return dwError;
88}
89
90static
91VOID
93 _In_ HWND hwndDlg)
94{
95 HWND hwndDeviceTree;
96 BOOL bHasItem;
97
98 hwndDeviceTree = GetDlgItem(hwndDlg, IDC_SAFE_REMOVE_DEVICE_TREE);
99
100 bHasItem = (TreeView_GetCount(hwndDeviceTree) != 0);
101 if (bHasItem)
102 TreeView_SelectItem(hwndDeviceTree, TreeView_GetFirstVisible(hwndDeviceTree));
103
105 EnableWindow(GetDlgItem(hwndDlg, IDC_SAFE_REMOVE_STOP), bHasItem);
106}
107
108static
109VOID
111 HWND hwndDlg,
113 PHOTPLUG_DATA pHotplugData)
114{
115 HTREEITEM hTreeItem;
116 RECT rc;
117 POINT pt;
118
120 if (hTreeItem == NULL)
121 return;
122
123 TreeView_GetItemRect(hwndTreeView, hTreeItem, &rc, TRUE);
124
125 pt.x = (rc.left + rc.right) / 2;
126 pt.y = (rc.top + rc.bottom) / 2;
128 TrackPopupMenu(GetSubMenu(pHotplugData->hPopupMenu, 0),
130 pt.x,
131 pt.y,
132 0,
133 hwndDlg,
134 NULL);
135}
136
137static
140 _In_ PHOTPLUG_DATA pHotplugData)
141{
142 HTREEITEM hTreeItem;
144
145 hTreeItem = TreeView_GetSelection(pHotplugData->hwndDeviceTree);
146 if (hTreeItem == NULL)
147 return 0;
148
149 ZeroMemory(&item, sizeof(item));
150 item.mask = TVIF_PARAM;
151 item.hItem = hTreeItem;
152
153 TreeView_GetItem(pHotplugData->hwndDeviceTree, &item);
154
155 return item.lParam;
156}
157
158static
159VOID
162 _In_ DEVINST DevInst)
163{
164 ULONG ulSize;
165 CONFIGRET cr;
166 LPWSTR pszDevId;
167
168 cr = CM_Get_Device_ID_Size(&ulSize, DevInst, 0);
169 if (cr != CR_SUCCESS || ulSize == 0)
170 return;
171
172 /* Take the terminating NULL into account */
173 ulSize++;
174
175 pszDevId = HeapAlloc(GetProcessHeap(), 0, ulSize * sizeof(WCHAR));
176 if (pszDevId == NULL)
177 return;
178
179 cr = CM_Get_Device_IDW(DevInst, pszDevId, ulSize, 0);
180 if (cr == CR_SUCCESS)
181 {
182 typedef int (WINAPI *PFDEVICEPROPERTIESW)(HWND, LPCWSTR, LPCWSTR, BOOL);
183 HMODULE hDevMgrDll;
184 PFDEVICEPROPERTIESW pDevicePropertiesW;
185
186 hDevMgrDll = LoadLibraryW(L"devmgr.dll");
187 if (hDevMgrDll != NULL)
188 {
189 pDevicePropertiesW = (PFDEVICEPROPERTIESW)GetProcAddress(hDevMgrDll, "DevicePropertiesW");
190 if (pDevicePropertiesW != NULL)
191 pDevicePropertiesW(hwndParent, NULL, pszDevId, FALSE);
192
193 FreeLibrary(hDevMgrDll);
194 }
195 }
196
197 HeapFree(GetProcessHeap(), 0, pszDevId);
198}
199
203 HWND hwndDlg,
204 UINT uMsg,
207{
208 PHOTPLUG_DATA pHotplugData;
209
210 pHotplugData = (PHOTPLUG_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
211
212 switch (uMsg)
213 {
214 case WM_INITDIALOG:
215 pHotplugData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HOTPLUG_DATA));
216 if (pHotplugData != NULL)
217 {
218 WCHAR szWindowTitle[MAX_PATH];
219
220 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pHotplugData);
221
224 szWindowTitle,
225 ARRAYSIZE(szWindowTitle)))
226 {
227 SetWindowTextW(hwndDlg, szWindowTitle);
228 }
229
230 pHotplugData->hIcon = (HICON)LoadImageW(hApplet,
236 pHotplugData->hIconSm = (HICON)LoadImageW(hApplet,
242 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)pHotplugData->hIcon);
243 SendMessageW(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)pHotplugData->hIconSm);
244
245 pHotplugData->ImageListData.cbSize = sizeof(pHotplugData->ImageListData);
246 SetupDiGetClassImageList(&pHotplugData->ImageListData);
247
248 pHotplugData->hPopupMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDM_POPUP_DEVICE_TREE));
249 pHotplugData->hwndDeviceTree = GetDlgItem(hwndDlg, IDC_SAFE_REMOVE_DEVICE_TREE);
250 pHotplugData->dwFlags = GetHotPlugFlags();
251
252 if (pHotplugData->dwFlags & HOTPLUG_DISPLAY_DEVICE_COMPONENTS)
254
255 TreeView_SetImageList(pHotplugData->hwndDeviceTree,
256 pHotplugData->ImageListData.ImageList,
258
259 EnumHotpluggedDevices(pHotplugData);
260 UpdateDialog(hwndDlg);
261 }
262 return TRUE;
263
264 case WM_COMMAND:
265 switch (LOWORD(wParam))
266 {
267 case IDCLOSE:
268 KillTimer(hwndDlg, 1);
269 EndDialog(hwndDlg, TRUE);
270 break;
271
273 if (HIWORD(wParam) == BN_CLICKED)
274 {
275 if (pHotplugData != NULL)
276 {
279 else
280 pHotplugData->dwFlags &= ~HOTPLUG_DISPLAY_DEVICE_COMPONENTS;
281
282 SetHotPlugFlags(pHotplugData->dwFlags);
283
284 EnumHotpluggedDevices(pHotplugData);
285 UpdateDialog(hwndDlg);
286 }
287 }
288 break;
289
291 case IDM_PROPERTIES:
292 ShowDeviceProperties(hwndDlg, GetSelectedDeviceInst(pHotplugData));
293 break;
294
296 case IDM_STOP:
297 {
298 if (pHotplugData != NULL)
299 {
302 hwndDlg,
304 (LPARAM)pHotplugData);
305 }
306
307 break;
308 }
309 }
310 break;
311
312 case WM_DEVICECHANGE:
313 switch (wParam)
314 {
316 SetTimer(hwndDlg, 1, 500, NULL);
317 break;
318 }
319 break;
320
321 case WM_TIMER:
322 if (wParam == 1)
323 {
324 KillTimer(hwndDlg, 1);
325
326 if (pHotplugData != NULL)
327 {
328 EnumHotpluggedDevices(pHotplugData);
329 UpdateDialog(hwndDlg);
330 }
331 }
332 break;
333
334 case WM_NOTIFY:
336 {
337 if (((LPNMHDR)lParam)->code == NM_RCLICK)
338 {
339 if (pHotplugData != NULL)
340 {
341 ShowContextMenu(hwndDlg,
342 ((LPNMHDR)lParam)->hwndFrom,
343 pHotplugData);
344 return TRUE;
345 }
346 }
347 }
348 break;
349
350 case WM_CLOSE:
351 KillTimer(hwndDlg, 1);
352 EndDialog(hwndDlg, TRUE);
353 break;
354
355 case WM_DESTROY:
356 if (pHotplugData != NULL)
357 {
358 if (pHotplugData->hPopupMenu != NULL)
359 DestroyMenu(pHotplugData->hPopupMenu);
360
362
363 if (pHotplugData->hIconSm)
364 DestroyIcon(pHotplugData->hIconSm);
365
366 if (pHotplugData->hIcon)
367 DestroyIcon(pHotplugData->hIcon);
368
369 HeapFree(GetProcessHeap(), 0, pHotplugData);
371 }
372 break;
373 }
374
375 return FALSE;
376}
377
378LONG
381 HWND hwnd,
382 UINT uMsg,
385{
386 DPRINT("InitApplet()\n");
387
390 hwnd,
392
393 // TODO
394 return TRUE;
395}
396
397LONG
400 HWND hwndCPl,
401 UINT uMsg,
402 LPARAM lParam1,
403 LPARAM lParam2)
404{
405 UINT i = (UINT)lParam1;
406
407 switch(uMsg)
408 {
409 case CPL_INIT:
410 return TRUE;
411
412 case CPL_GETCOUNT:
413 return NUM_APPLETS;
414
415 case CPL_INQUIRE:
416 if (i < NUM_APPLETS)
417 {
418 CPLINFO *CPlInfo = (CPLINFO*)lParam2;
419 CPlInfo->lData = 0;
420 CPlInfo->idIcon = Applets[i].idIcon;
421 CPlInfo->idName = Applets[i].idName;
422 CPlInfo->idInfo = Applets[i].idDescription;
423 }
424 else
425 {
426 return TRUE;
427 }
428 break;
429
430 case CPL_DBLCLK:
431 if (i < NUM_APPLETS)
432 Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
433 else
434 return TRUE;
435 break;
436
437 case CPL_STARTWPARMSW:
438 if (i < NUM_APPLETS)
439 return Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
440 break;
441 }
442 return FALSE;
443}
444
445INT
446WINAPI
448 HINSTANCE hinstDLL,
451{
453
454 switch (dwReason)
455 {
458 hApplet = hinstDLL;
459 break;
460 }
461 return TRUE;
462}
#define IDM_PROPERTIES
Definition: resources.h:9
DWORD dwReason
Definition: misc.cpp:141
#define RegCloseKey(hKey)
Definition: registry.h:49
DWORD DEVINST
Definition: cfgmgr32.h:76
RETURN_TYPE CONFIGRET
Definition: cfgmgr32.h:74
#define CR_SUCCESS
Definition: cfgmgr32.h:842
CONFIGRET WINAPI CM_Get_Device_IDW(_In_ DEVINST dnDevInst, _Out_writes_(BufferLen) PWCHAR Buffer, _In_ ULONG BufferLen, _In_ ULONG ulFlags)
Definition: cfgmgr.c:3775
CONFIGRET WINAPI CM_Get_Device_ID_Size(_Out_ PULONG pulLen, _In_ DEVINST dnDevInst, _In_ ULONG ulFlags)
Definition: cfgmgr.c:4172
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_STARTWPARMSW
Definition: cpl.h:21
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
static HWND hwndParent
Definition: cryptui.c:300
#define DBT_DEVNODES_CHANGED
Definition: dbt.h:28
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NUM_APPLETS
Definition: access.c:14
#define IDS_CPLNAME
Definition: resource.h:8
#define IDS_CPLDESCRIPTION
Definition: resource.h:9
VOID EnumHotpluggedDevices(_In_ PHOTPLUG_DATA pHotplugData)
Definition: enum.c:150
#define IDM_POPUP_DEVICE_TREE
Definition: resource.h:21
#define IDD_CONFIRM_STOP_HARDWARE_DIALOG
Definition: resource.h:17
#define IDC_SAFE_REMOVE_DEVICE_TREE
Definition: resource.h:11
#define IDC_SAFE_REMOVE_DISPLAY_COMPONENTS
Definition: resource.h:15
#define IDC_SAFE_REMOVE_PROPERTIES
Definition: resource.h:13
#define IDM_STOP
Definition: resource.h:22
#define IDC_SAFE_REMOVE_STOP
Definition: resource.h:14
#define IDI_HOTPLUG
Definition: resource.h:4
#define IDD_SAFE_REMOVE_HARDWARE_DIALOG
Definition: resource.h:9
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define APIENTRY
Definition: api.h:79
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define GetProcessHeap()
Definition: compat.h:736
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
HANDLE HWND
Definition: compat.h:19
#define GetProcAddress(x, y)
Definition: compat.h:753
#define HeapAlloc
Definition: compat.h:733
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define DLL_THREAD_ATTACH
Definition: compat.h:132
#define LoadLibraryW(x)
Definition: compat.h:747
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
BOOL WINAPI SetupDiDestroyClassImageList(IN PSP_CLASSIMAGELIST_DATA ClassImageListData)
Definition: devclass.c:85
BOOL WINAPI SetupDiGetClassImageList(OUT PSP_CLASSIMAGELIST_DATA ClassImageListData)
Definition: devclass.c:322
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define pt(x, y)
Definition: drawing.c:79
INT_PTR CALLBACK ConfirmRemovalDlgProc(_In_ HWND hwndDlg, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: eject.c:84
HWND hwndTreeView
Definition: eventvwr.c:65
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static VOID ShowContextMenu(HWND hwndDlg, HWND hwndTreeView, PHOTPLUG_DATA pHotplugData)
Definition: hotplug.c:110
LONG APIENTRY InitApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
Definition: hotplug.c:380
static DEVINST GetSelectedDeviceInst(_In_ PHOTPLUG_DATA pHotplugData)
Definition: hotplug.c:139
INT_PTR CALLBACK SafeRemovalDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: hotplug.c:202
static VOID ShowDeviceProperties(_In_ HWND hwndParent, _In_ DEVINST DevInst)
Definition: hotplug.c:160
static DWORD SetHotPlugFlags(_In_ DWORD dwFlags)
Definition: hotplug.c:58
INT WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: hotplug.c:447
static DWORD GetHotPlugFlags(VOID)
Definition: hotplug.c:25
APPLET Applets[NUM_APPLETS]
Definition: hotplug.c:18
static VOID UpdateDialog(_In_ HWND hwndDlg)
Definition: hotplug.c:92
HINSTANCE hApplet
Definition: hotplug.c:15
struct _HOTPLUG_DATA * PHOTPLUG_DATA
#define HOTPLUG_DISPLAY_DEVICE_COMPONENTS
Definition: hotplug.h:24
static IN DWORD IN LPVOID lpvReserved
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static HICON
Definition: imagelist.c:80
static ATOM item
Definition: dde.c:856
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define _In_
Definition: no_sal2.h:158
#define BOOL
Definition: nt_native.h:43
#define KEY_READ
Definition: nt_native.h:1023
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
#define KEY_WRITE
Definition: nt_native.h:1031
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
long LONG
Definition: pedump.c:60
#define TreeView_SelectItem(hwnd, hitem)
Definition: commctrl.h:3486
#define TVSIL_NORMAL
Definition: commctrl.h:3448
#define TreeView_GetSelection(hwnd)
Definition: commctrl.h:3478
#define TreeView_GetItem(hwnd, pitem)
Definition: commctrl.h:3495
#define TreeView_GetItemRect(hwnd, hitem, prc, code)
Definition: commctrl.h:3434
#define TreeView_GetCount(hwnd)
Definition: commctrl.h:3437
#define TreeView_GetFirstVisible(hwnd)
Definition: commctrl.h:3475
#define NM_RCLICK
Definition: commctrl.h:133
#define TVIF_PARAM
Definition: commctrl.h:3273
#define TreeView_SetImageList(hwnd, himl, iImage)
Definition: commctrl.h:3452
#define REGSTR_PATH_SYSTRAY
Definition: regstr.h:531
#define WM_NOTIFY
Definition: richedit.h:61
#define REG_DWORD
Definition: sdbapi.c:596
#define DPRINT
Definition: sndvol32.h:73
Definition: hotplug.h:34
int idDescription
Definition: hotplug.h:37
int idName
Definition: hotplug.h:36
int idIcon
Definition: hotplug.h:35
APPLET_PROC AppletProc
Definition: hotplug.h:38
HMENU hPopupMenu
Definition: hotplug.h:46
HICON hIcon
Definition: hotplug.h:43
DWORD dwFlags
Definition: hotplug.h:48
HICON hIconSm
Definition: hotplug.h:44
SP_CLASSIMAGELIST_DATA ImageListData
Definition: hotplug.h:45
Definition: inflate.c:139
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
int32_t INT_PTR
Definition: typedefs.h:64
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define ZeroMemory
Definition: winbase.h:1737
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define Button_GetCheck(hwndCtl)
Definition: windowsx.h:31
#define Button_SetCheck(hwndCtl, check)
Definition: windowsx.h:35
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define WM_CLOSE
Definition: winuser.h:1624
#define DWLP_USER
Definition: winuser.h:875
#define IMAGE_ICON
Definition: winuser.h:212
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define WM_COMMAND
Definition: winuser.h:1743
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2255
#define SM_CYSMICON
Definition: winuser.h:1016
#define WM_INITDIALOG
Definition: winuser.h:1742
#define WM_DEVICECHANGE
Definition: winuser.h:1814
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define TPM_TOPALIGN
Definition: winuser.h:2386
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define SM_CXSMICON
Definition: winuser.h:1015
#define SM_CYICON
Definition: winuser.h:976
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_TIMER
Definition: winuser.h:1745
#define TPM_LEFTALIGN
Definition: winuser.h:2380
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define LoadMenu
Definition: winuser.h:5829
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define LR_DEFAULTCOLOR
Definition: winuser.h:1090
#define BN_CLICKED
Definition: winuser.h:1928
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define WM_DESTROY
Definition: winuser.h:1612
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SM_CXICON
Definition: winuser.h:975
#define MAKEINTRESOURCE
Definition: winuser.h:591
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define DialogBox
Definition: winuser.h:5773
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2105
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185