ReactOS 0.4.15-dev-8058-ga7cbb60
desktop.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Display Control Panel
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Desktop customization property page
5 * COPYRIGHT: Copyright 2018-2022 Stanislav Motylkov <x86corez@gmail.com>
6 */
7
8#include "desk.h"
9
10#include <shlwapi.h>
11#include <shellapi.h>
12
13/* From shresdef.h */
14#define FCIDM_DESKBROWSER_REFRESH 0xA220
15
16#define IDS_TITLE_MYCOMP 30386
17#define IDS_TITLE_MYNET 30387
18#define IDS_TITLE_BIN_1 30388
19#define IDS_TITLE_BIN_0 30389
20
21/* Workaround:
22 * There's no special fallback icon title string
23 * for My Documents in shell32.dll, so use IDS_PERSONAL.
24 *
25 * Windows does this in some different way.
26 */
27#define IDS_PERSONAL 9227
28
29static const TCHAR szHideDesktopIcons[] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\");
30static const TCHAR szClassicStartMenu[] = TEXT("ClassicStartMenu");
31static const TCHAR szNewStartPanel[] = TEXT("NewStartPanel");
32
33struct
34{
38 {TEXT("{450D8FBA-AD25-11D0-98A8-0800361B1103}"), IDC_ICONS_MYDOCS}, /* My Documents */
39 {TEXT("{208D2C60-3AEA-1069-A2D7-08002B30309D}"), IDC_ICONS_MYNET}, /* My Network Places */
40 {TEXT("{20D04FE0-3AEA-1069-A2D8-08002B30309D}"), IDC_ICONS_MYCOMP}, /* My Computer */
41 {TEXT("{871C5380-42A0-1069-A2EA-08002B30309D}"), IDC_ICONS_INTERNET}, /* Internet Browser */
42};
43
44static const TCHAR szUserClass[] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\");
45static const TCHAR szSysClass[] = TEXT("CLSID\\");
46static const TCHAR szDefaultIcon[] = TEXT("\\DefaultIcon");
47static const TCHAR szFallbackIcon[] = TEXT("%SystemRoot%\\system32\\shell32.dll,0");
48
49struct
50{
55 {TEXT("{20D04FE0-3AEA-1069-A2D8-08002B30309D}"), IDS_TITLE_MYCOMP, NULL}, /* My Computer */
56 {TEXT("{450D8FBA-AD25-11D0-98A8-0800361B1103}"), IDS_PERSONAL, NULL}, /* My Documents */
57 {TEXT("{208D2C60-3AEA-1069-A2D7-08002B30309D}"), IDS_TITLE_MYNET, NULL}, /* My Network Places */
58 {TEXT("{645FF040-5081-101B-9F08-00AA002F954E}"), IDS_TITLE_BIN_1, TEXT("Full")}, /* Recycle Bin (full) */
59 {TEXT("{645FF040-5081-101B-9F08-00AA002F954E}"), IDS_TITLE_BIN_0, TEXT("Empty")}, /* Recycle Bin (empty) */
60};
61
62VOID
64{
65 UINT i;
66 TCHAR regPath[MAX_PATH];
67
68 /* Load desktop icon settings from the registry */
69 StringCchCopy(regPath, _countof(regPath), szHideDesktopIcons);
70 StringCchCat(regPath, _countof(regPath), szClassicStartMenu);
71
72 for (i = 0; i < _countof(pData->optIcons); i++)
73 {
74 pData->optIcons[i].bHideClassic = SHRegGetBoolUSValue(regPath, DesktopIcons[i].CLSID, FALSE, FALSE);
75 }
76
77 StringCchCopy(regPath, _countof(regPath), szHideDesktopIcons);
78 StringCchCat(regPath, _countof(regPath), szNewStartPanel);
79
80 for (i = 0; i < _countof(pData->optIcons); i++)
81 {
82 pData->optIcons[i].bHideNewStart = SHRegGetBoolUSValue(regPath, DesktopIcons[i].CLSID, FALSE, TRUE);
83 }
84
85 for (i = 0; i < _countof(IconChange); i++)
86 {
87 DWORD cbData, dwType;
88 TCHAR szData[MAX_PATH];
89
90 /* Current icons */
91 StringCchCopy(regPath, _countof(regPath), szUserClass);
92 StringCchCat(regPath, _countof(regPath), IconChange[i].CLSID);
93 StringCchCat(regPath, _countof(regPath), szDefaultIcon);
94 cbData = sizeof(szData);
95
96 if (SHGetValue(HKEY_CURRENT_USER, regPath, IconChange[i].IconName, &dwType,
97 &szData, &cbData) == ERROR_SUCCESS &&
98 (dwType == REG_SZ || dwType == REG_EXPAND_SZ))
99 {
100 StringCchCopy(pData->Icon[i].szPath, _countof(pData->Icon[i].szPath), szData);
101 }
102
103 /* Default icons */
104 /* FIXME: Get default icons from theme data, fallback to CLSID data on error. */
105 StringCchCopy(regPath, _countof(regPath), szSysClass);
106 StringCchCat(regPath, _countof(regPath), IconChange[i].CLSID);
107 StringCchCat(regPath, _countof(regPath), szDefaultIcon);
108 cbData = sizeof(szData);
109
110 if (SHGetValue(HKEY_CLASSES_ROOT, regPath, IconChange[i].IconName, &dwType,
111 &szData, &cbData) == ERROR_SUCCESS &&
112 (dwType == REG_SZ || dwType == REG_EXPAND_SZ))
113 {
114 StringCchCopy(pData->DefIcon[i].szPath, _countof(pData->DefIcon[i].szPath), szData);
115 }
116
117 /* Emergency fallback */
118 if (lstrlen(pData->DefIcon[i].szPath) == 0)
119 StringCchCopy(pData->DefIcon[i].szPath, _countof(pData->DefIcon[i].szPath), szFallbackIcon);
120
121 if (lstrlen(pData->Icon[i].szPath) == 0)
122 StringCchCopy(pData->Icon[i].szPath, _countof(pData->Icon[i].szPath), pData->DefIcon[i].szPath);
123 }
124}
125
126BOOL
128{
129 UINT i;
130
131 if (!pData->bLocalSettingsChanged)
132 return FALSE;
133
134 for (i = 0; i < _countof(DesktopIcons); i++)
135 {
136 if (!pData->bLocalHideChanged[i])
137 continue;
138
139 pData->optIcons[i].bHideClassic =
140 pData->optIcons[i].bHideNewStart = pData->bLocalHideIcon[i];
141 pData->bHideChanged[i] = TRUE;
142 }
143
144 for (i = 0; i < _countof(IconChange); i++)
145 {
146 if (!pData->bLocalIconChanged[i])
147 continue;
148
149 StringCchCopy(pData->Icon[i].szPath, _countof(pData->Icon[i].szPath), pData->LocalIcon[i].szPath);
150 pData->bIconChanged[i] = TRUE;
151 }
152
153 pData->bSettingsChanged = TRUE;
154 return TRUE;
155}
156
157static BOOL
159{
160 TCHAR regPath[MAX_PATH];
161
162 StringCchCopy(regPath, _countof(regPath), szHideDesktopIcons);
163 StringCchCat(regPath, _countof(regPath), bNewStart ? szNewStartPanel : szClassicStartMenu);
164
165 return SHRegGetBoolUSValue(regPath, DesktopIcons[i].CLSID, FALSE, bNewStart);
166}
167
168static VOID
169SetCurrentValue(UINT i, BOOL bNewStart, BOOL bValue)
170{
171 TCHAR regPath[MAX_PATH];
172
173 StringCchCopy(regPath, _countof(regPath), szHideDesktopIcons);
174 StringCchCat(regPath, _countof(regPath), bNewStart ? szNewStartPanel : szClassicStartMenu);
175
177 (LPBYTE)&bValue, sizeof(bValue));
178}
179
180VOID
182{
183 UINT i;
184
185 for (i = 0; i < _countof(DesktopIcons); i++)
186 {
187 if (!pData->bHideChanged[i])
188 continue;
189
190 if (GetCurrentValue(i, FALSE) != pData->optIcons[i].bHideClassic)
191 SetCurrentValue(i, FALSE, pData->optIcons[i].bHideClassic);
192
193 if (GetCurrentValue(i, TRUE) != pData->optIcons[i].bHideNewStart)
194 SetCurrentValue(i, TRUE, pData->optIcons[i].bHideNewStart);
195
196 pData->bHideChanged[i] = FALSE;
197 }
198
199 for (i = 0; i < _countof(IconChange); i++)
200 {
201 TCHAR iconPath[MAX_PATH];
202 DWORD dwType = (pData->Icon[i].szPath[0] == TEXT('%') ? REG_EXPAND_SZ : REG_SZ);
203
204 if (!pData->bIconChanged[i])
205 continue;
206
207 StringCchCopy(iconPath, _countof(iconPath), szUserClass);
208 StringCchCat(iconPath, _countof(iconPath), IconChange[i].CLSID);
209 StringCchCat(iconPath, _countof(iconPath), szDefaultIcon);
210
212 pData->Icon[i].szPath, sizeof(pData->Icon[i].szPath));
214 {
215 /* Also apply to the root value */
216 SHSetValue(HKEY_CURRENT_USER, iconPath, NULL, dwType,
217 pData->Icon[i].szPath, sizeof(pData->Icon[i].szPath));
218 }
219 pData->bIconChanged[i] = FALSE;
220 }
221
222 pData->bSettingsChanged = FALSE;
223
224 /* Refresh the desktop */
226}
227
228static HICON
230{
231 INT iIndex;
233
236 return ExtractIcon(hApplet, szPath, iIndex);
237}
238
239static VOID
241{
242 UINT i;
243 SHELLSTATE ss = {0};
244 HWND hwndList;
245
247
248 for (i = 0; i < _countof(pData->optIcons); i++)
249 {
250 BOOL bHide;
251
252 if (ss.fStartPanelOn)
253 bHide = pData->optIcons[i].bHideNewStart;
254 else
255 bHide = pData->optIcons[i].bHideClassic;
256
257 CheckDlgButton(hwndDlg,
259 bHide ? BST_UNCHECKED : BST_CHECKED);
260
261 pData->bLocalHideIcon[i] = bHide;
262 pData->bLocalHideChanged[i] = FALSE;
263 }
264
265 pData->iLocalCurIcon = 0;
266 hwndList = GetDlgItem(hwndDlg, IDC_ICONS_LISTVIEW);
268 ListView_SetImageList(hwndList, pData->hLocalImageList, LVSIL_NORMAL);
269
270 for (i = 0; i < _countof(IconChange); i++)
271 {
272 TCHAR szClassPath[MAX_PATH];
273 DWORD dwType, cbData;
274 LVITEM lvitem = {0};
275 HICON hIcon;
276
277 StringCchCopy(pData->LocalIcon[i].szPath, _countof(pData->LocalIcon[i].szPath), pData->Icon[i].szPath);
278 pData->bLocalIconChanged[i] = FALSE;
279
280 /* Try loading user-defined desktop icon title */
281 StringCchCopy(szClassPath, _countof(szClassPath), szUserClass);
282 StringCchCat(szClassPath, _countof(szClassPath), IconChange[i].CLSID);
283 cbData = sizeof(pData->LocalIcon[i].szTitle);
284
285 if (SHGetValue(HKEY_CURRENT_USER, szClassPath, IconChange[i].IconName, &dwType,
286 pData->LocalIcon[i].szTitle, &cbData) != ERROR_SUCCESS || dwType != REG_SZ)
287 {
288 /* Fallback to predefined strings */
289 LoadString(GetModuleHandle(TEXT("shell32.dll")),
291 pData->LocalIcon[i].szTitle,
292 _countof(pData->LocalIcon[i].szTitle));
293 }
294
295 hIcon = GetIconFromLocation(pData->LocalIcon[i].szPath);
296
297 lvitem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
298 lvitem.iItem = i;
299 lvitem.iSubItem = 0;
300 lvitem.pszText = pData->LocalIcon[i].szTitle;
301 lvitem.lParam = (LPARAM)i;
302
303 if (hIcon)
304 {
305 if (pData->hLocalImageList)
306 lvitem.iImage = ImageList_AddIcon(pData->hLocalImageList, hIcon);
308 }
309
310 if (ListView_InsertItem(hwndList, &lvitem) < 0)
311 continue;
312
313 if (i > 0)
314 continue;
315
316 lvitem.state = LVIS_FOCUSED | LVIS_SELECTED;
317 lvitem.stateMask = LVIS_FOCUSED | LVIS_SELECTED;
318 SendMessage(hwndList, LVM_SETITEMSTATE, 0, (LPARAM)&lvitem);
319 }
320
321 pData->bLocalSettingsChanged = FALSE;
322}
323
324static VOID
326{
327 if (pData->hLocalImageList)
328 {
330 ImageList_Destroy(pData->hLocalImageList);
331 }
332
333 SetWindowLongPtr(hwndDlg, DWLP_USER, 0);
334}
335
336/* Property page dialog callback */
339{
341
343
344 switch (uMsg)
345 {
346 case WM_INITDIALOG:
347 {
349 pData = (PDESKTOP_DATA)ppsp->lParam;
350
352 DesktopOnInitDialog(hwndDlg, pData);
353 break;
354 }
355
356 case WM_DESTROY:
357 {
359 break;
360 }
361
362 case WM_COMMAND:
363 {
364 DWORD controlId = LOWORD(wParam);
366
367 if (command == BN_CLICKED)
368 {
369 UINT i;
370 BOOL bUpdateIcon = FALSE;
371
372 for (i = 0; i < _countof(DesktopIcons); i++)
373 {
374 if (DesktopIcons[i].Checkbox == controlId)
375 {
376 pData->bLocalHideIcon[i] =
378
379 pData->bLocalSettingsChanged =
380 pData->bLocalHideChanged[i] = TRUE;
381
382 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
383 break;
384 }
385 }
386
387 if (controlId == IDC_ICONS_CHANGEICON)
388 {
390 INT iIndex;
391 i = pData->iLocalCurIcon;
392
393 ExpandEnvironmentStrings(pData->LocalIcon[i].szPath, szPath, _countof(szPath));
395
396 if (PickIconDlg(hwndDlg, szPath, _countof(szPath), &iIndex))
397 {
398 StringCchCopy(pData->LocalIcon[i].szPath, _countof(pData->LocalIcon[i].szPath), szPath);
399 PathUnExpandEnvStrings(pData->LocalIcon[i].szPath, szPath, _countof(szPath));
400
401 StringCchPrintf(pData->LocalIcon[i].szPath, _countof(pData->LocalIcon[i].szPath), TEXT("%s,%d"), szPath, iIndex);
402 bUpdateIcon = TRUE;
403 }
404 }
405 else if (controlId == IDC_ICONS_SETDEFAULT)
406 {
407 i = pData->iLocalCurIcon;
408
409 StringCchCopy(pData->LocalIcon[i].szPath, _countof(pData->LocalIcon[i].szPath), pData->DefIcon[i].szPath);
410 bUpdateIcon = TRUE;
411 }
412
413 if (bUpdateIcon)
414 {
415 HWND hwndList = GetDlgItem(hwndDlg, IDC_ICONS_LISTVIEW);
416 HICON hIcon;
417
418 hIcon = GetIconFromLocation(pData->LocalIcon[i].szPath);
419
420 if (hIcon)
421 {
422 if (pData->hLocalImageList)
423 ImageList_ReplaceIcon(pData->hLocalImageList, i, hIcon);
425 }
426
427 pData->bLocalSettingsChanged =
428 pData->bLocalIconChanged[i] = TRUE;
429
430 InvalidateRect(hwndList, NULL, TRUE);
431 SetFocus(hwndList);
432 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
433 }
434 }
435 break;
436 }
437
438 case WM_NOTIFY:
439 {
441
442 switch (nm->hdr.code)
443 {
444 case LVN_ITEMCHANGED:
445 {
446 if ((nm->uNewState & LVIS_SELECTED) == 0)
447 return FALSE;
448
449 pData->iLocalCurIcon = nm->iItem;
450 break;
451 }
452 }
453 break;
454 }
455 }
456
457 return FALSE;
458}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NUM_DESKTOP_ICONS
Definition: desk.h:84
struct _DESKTOP_DATA * PDESKTOP_DATA
#define NUM_CHANGE_ICONS
Definition: desk.h:85
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
#define IDS_TITLE_MYNET
Definition: desktop.c:17
static const TCHAR szDefaultIcon[]
Definition: desktop.c:46
static VOID SetCurrentValue(UINT i, BOOL bNewStart, BOOL bValue)
Definition: desktop.c:169
struct @218 DesktopIcons[NUM_DESKTOP_ICONS]
VOID InitDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:63
LPCTSTR IconName
Definition: desktop.c:53
BOOL SaveDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:127
#define IDS_TITLE_BIN_0
Definition: desktop.c:19
#define IDS_TITLE_MYCOMP
Definition: desktop.c:16
UINT Checkbox
Definition: desktop.c:36
static VOID DesktopOnInitDialog(IN HWND hwndDlg, IN PDESKTOP_DATA pData)
Definition: desktop.c:240
static BOOL GetCurrentValue(UINT i, BOOL bNewStart)
Definition: desktop.c:158
static const TCHAR szClassicStartMenu[]
Definition: desktop.c:30
static const TCHAR szSysClass[]
Definition: desktop.c:45
static HICON GetIconFromLocation(LPTSTR szIconPath)
Definition: desktop.c:229
VOID SetDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:181
#define IDS_TITLE_BIN_1
Definition: desktop.c:18
static VOID DesktopOnDestroyDialog(IN HWND hwndDlg, IN PDESKTOP_DATA pData)
Definition: desktop.c:325
#define FCIDM_DESKBROWSER_REFRESH
Definition: desktop.c:14
INT_PTR CALLBACK DesktopPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: desktop.c:338
static const TCHAR szNewStartPanel[]
Definition: desktop.c:31
static const TCHAR szFallbackIcon[]
Definition: desktop.c:47
static const TCHAR szHideDesktopIcons[]
Definition: desktop.c:29
#define IDS_PERSONAL
Definition: desktop.c:27
UINT TitleId
Definition: desktop.c:52
static const TCHAR szUserClass[]
Definition: desktop.c:44
struct @219 IconChange[NUM_CHANGE_ICONS]
LPCTSTR CLSID
Definition: desktop.c:35
#define IDC_ICONS_INTERNET
Definition: resource.h:188
#define IDC_ICONS_LISTVIEW
Definition: resource.h:189
#define IDC_ICONS_MYCOMP
Definition: resource.h:187
#define IDC_ICONS_SETDEFAULT
Definition: resource.h:191
#define IDC_ICONS_CHANGEICON
Definition: resource.h:190
#define IDC_ICONS_MYDOCS
Definition: resource.h:185
#define IDC_ICONS_MYNET
Definition: resource.h:186
INT WINAPI ImageList_ReplaceIcon(HIMAGELIST himl, INT nIndex, HICON hIcon)
Definition: imagelist.c:2779
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
BOOL WINAPI PickIconDlg(HWND hWndOwner, LPWSTR lpstrFile, UINT nMaxFile, INT *lpdwIconIndex)
Definition: dialogs.cpp:362
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
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
#define ss
Definition: i386-dis.c:441
#define TEXT(s)
Definition: k32.h:26
#define REG_SZ
Definition: layer.c:22
LPCWSTR szPath
Definition: env.c:37
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
#define LOWORD(l)
Definition: pedump.c:82
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2408
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2304
#define LVM_SETITEMSTATE
Definition: commctrl.h:2672
#define ILC_COLOR32
Definition: commctrl.h:358
#define LVIS_SELECTED
Definition: commctrl.h:2319
#define LVITEM
Definition: commctrl.h:2375
#define LVIF_PARAM
Definition: commctrl.h:2311
struct tagNMLISTVIEW * LPNMLISTVIEW
#define LVIF_TEXT
Definition: commctrl.h:2309
#define ImageList_AddIcon(himl, hicon)
Definition: commctrl.h:415
#define ILC_MASK
Definition: commctrl.h:351
#define LVIF_IMAGE
Definition: commctrl.h:2310
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
#define LVIS_FOCUSED
Definition: commctrl.h:2318
#define LVSIL_NORMAL
Definition: commctrl.h:2298
#define WM_NOTIFY
Definition: richedit.h:61
#define REG_DWORD
Definition: sdbapi.c:596
#define ExtractIcon
Definition: shellapi.h:688
VOID WINAPI SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet)
Definition: shellord.c:202
#define SSF_STARTPANELON
Definition: shlobj.h:1610
#define SHRegGetBoolUSValue
Definition: shlwapi.h:574
#define SHSetValue
Definition: shlwapi.h:92
#define PathUnExpandEnvStrings
Definition: shlwapi.h:1141
#define PathParseIconLocation
Definition: shlwapi.h:991
#define SHGetValue
Definition: shlwapi.h:70
#define _countof(array)
Definition: sndvol32.h:68
#define StringCchCopy
Definition: strsafe.h:139
#define StringCchPrintf
Definition: strsafe.h:517
#define StringCchCat
Definition: strsafe.h:317
UINT code
Definition: winuser.h:3159
UINT uNewState
Definition: commctrl.h:3036
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
int32_t INT_PTR
Definition: typedefs.h:64
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define HIWORD(l)
Definition: typedefs.h:247
HWND WINAPI GetShellWindow(VOID)
Definition: desktop.c:651
#define ExpandEnvironmentStrings
Definition: winbase.h:3774
#define GetModuleHandle
Definition: winbase.h:3827
#define lstrlen
Definition: winbase.h:3876
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define DWLP_USER
Definition: winuser.h:872
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define BST_UNCHECKED
Definition: winuser.h:199
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define SM_CYICON
Definition: winuser.h:973
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SendMessage
Definition: winuser.h:5843
#define PostMessage
Definition: winuser.h:5832
HWND WINAPI GetParent(_In_ HWND)
#define LoadString
Definition: winuser.h:5819
#define BN_CLICKED
Definition: winuser.h:1925
#define WM_DESTROY
Definition: winuser.h:1609
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SM_CXICON
Definition: winuser.h:972
int WINAPI GetSystemMetrics(_In_ int)
#define BST_CHECKED
Definition: winuser.h:197
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2084
char TCHAR
Definition: xmlstorage.h:189
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
CHAR * LPTSTR
Definition: xmlstorage.h:192