ReactOS  0.4.15-dev-5618-g8866b9d
desktop.c File Reference
#include "desk.h"
#include <shlwapi.h>
#include <shellapi.h>
Include dependency graph for desktop.c:

Go to the source code of this file.

Macros

#define FCIDM_DESKBROWSER_REFRESH   0xA220
 
#define IDS_TITLE_MYCOMP   30386
 
#define IDS_TITLE_MYNET   30387
 
#define IDS_TITLE_BIN_1   30388
 
#define IDS_TITLE_BIN_0   30389
 
#define IDS_PERSONAL   9227
 

Functions

VOID InitDesktopSettings (PDESKTOP_DATA pData)
 
BOOL SaveDesktopSettings (PDESKTOP_DATA pData)
 
static BOOL GetCurrentValue (UINT i, BOOL bNewStart)
 
static VOID SetCurrentValue (UINT i, BOOL bNewStart, BOOL bValue)
 
VOID SetDesktopSettings (PDESKTOP_DATA pData)
 
static HICON GetIconFromLocation (LPTSTR szIconPath)
 
static VOID DesktopOnInitDialog (IN HWND hwndDlg, IN PDESKTOP_DATA pData)
 
static VOID DesktopOnDestroyDialog (IN HWND hwndDlg, IN PDESKTOP_DATA pData)
 
INT_PTR CALLBACK DesktopPageProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 

Variables

static const TCHAR szHideDesktopIcons [] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\")
 
static const TCHAR szClassicStartMenu [] = TEXT("ClassicStartMenu")
 
static const TCHAR szNewStartPanel [] = TEXT("NewStartPanel")
 
struct {
   LPCTSTR   CLSID
 
   UINT   Checkbox
 
DesktopIcons [NUM_DESKTOP_ICONS]
 
static const TCHAR szUserClass [] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\")
 
static const TCHAR szSysClass [] = TEXT("CLSID\\")
 
static const TCHAR szDefaultIcon [] = TEXT("\\DefaultIcon")
 
static const TCHAR szFallbackIcon [] = TEXT("%SystemRoot%\\system32\\shell32.dll,0")
 
struct {
   LPCTSTR   CLSID
 
   UINT   TitleId
 
   LPCTSTR   IconName
 
IconChange [NUM_CHANGE_ICONS]
 

Macro Definition Documentation

◆ FCIDM_DESKBROWSER_REFRESH

#define FCIDM_DESKBROWSER_REFRESH   0xA220

Definition at line 14 of file desktop.c.

◆ IDS_PERSONAL

#define IDS_PERSONAL   9227

Definition at line 27 of file desktop.c.

◆ IDS_TITLE_BIN_0

#define IDS_TITLE_BIN_0   30389

Definition at line 19 of file desktop.c.

◆ IDS_TITLE_BIN_1

#define IDS_TITLE_BIN_1   30388

Definition at line 18 of file desktop.c.

◆ IDS_TITLE_MYCOMP

#define IDS_TITLE_MYCOMP   30386

Definition at line 16 of file desktop.c.

◆ IDS_TITLE_MYNET

#define IDS_TITLE_MYNET   30387

Definition at line 17 of file desktop.c.

Function Documentation

◆ DesktopOnDestroyDialog()

static VOID DesktopOnDestroyDialog ( IN HWND  hwndDlg,
IN PDESKTOP_DATA  pData 
)
static

Definition at line 325 of file desktop.c.

326 {
327  if (pData->hLocalImageList)
328  {
330  ImageList_Destroy(pData->hLocalImageList);
331  }
332 
333  SetWindowLongPtr(hwndDlg, DWLP_USER, 0);
334 }
#define IDC_ICONS_LISTVIEW
Definition: resource.h:189
#define SetWindowLongPtr
Definition: treelist.c:70
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2304
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define DWLP_USER
Definition: winuser.h:866
#define LVSIL_NORMAL
Definition: commctrl.h:2298
#define NULL
Definition: types.h:112
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by DesktopPageProc().

◆ DesktopOnInitDialog()

static VOID DesktopOnInitDialog ( IN HWND  hwndDlg,
IN PDESKTOP_DATA  pData 
)
static

Definition at line 240 of file desktop.c.

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 }
struct @209 IconChange[NUM_CHANGE_ICONS]
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
static HICON
Definition: imagelist.c:84
#define ERROR_SUCCESS
Definition: deptool.c:10
int WINAPI GetSystemMetrics(int nIndex)
Definition: desktop.c:139
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
UINT TitleId
Definition: desktop.c:52
#define HKEY_CURRENT_USER
Definition: winreg.h:11
struct @208 DesktopIcons[NUM_DESKTOP_ICONS]
#define StringCchCat
Definition: strsafe.h:317
#define IDC_ICONS_LISTVIEW
Definition: resource.h:189
UINT Checkbox
Definition: desktop.c:36
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2408
LPCTSTR IconName
Definition: desktop.c:53
#define ILC_COLOR32
Definition: commctrl.h:358
#define LVIF_TEXT
Definition: commctrl.h:2309
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define SM_CXICON
Definition: winuser.h:966
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2304
static const TCHAR szUserClass[]
Definition: desktop.c:44
#define LVIS_SELECTED
Definition: commctrl.h:2319
LONG_PTR LPARAM
Definition: windef.h:208
VOID WINAPI SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet)
Definition: shellord.c:201
char TCHAR
Definition: xmlstorage.h:189
#define SHGetValue
Definition: shlwapi.h:70
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
#define LVIF_IMAGE
Definition: commctrl.h:2310
unsigned long DWORD
Definition: ntddk_ex.h:95
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:540
#define SM_CYICON
Definition: winuser.h:967
#define LVM_SETITEMSTATE
Definition: commctrl.h:2672
#define StringCchCopy
Definition: strsafe.h:139
#define ILC_MASK
Definition: commctrl.h:351
static HICON GetIconFromLocation(LPTSTR szIconPath)
Definition: desktop.c:229
#define LVSIL_NORMAL
Definition: commctrl.h:2298
#define BST_UNCHECKED
Definition: winuser.h:199
#define TEXT(s)
Definition: k32.h:26
#define GetModuleHandle
Definition: winbase.h:3698
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
HICON hIcon
Definition: msconfig.c:44
#define SSF_STARTPANELON
Definition: shlobj.h:1544
unsigned int UINT
Definition: ndis.h:50
#define BST_CHECKED
Definition: winuser.h:197
#define SendMessage
Definition: winuser.h:5833
#define LVIF_PARAM
Definition: commctrl.h:2311
#define LVITEM
Definition: commctrl.h:2375
#define ss
Definition: i386-dis.c:442
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define LoadString
Definition: winuser.h:5809
#define LVIS_FOCUSED
Definition: commctrl.h:2318
#define REG_SZ
Definition: layer.c:22

Referenced by DesktopPageProc().

◆ DesktopPageProc()

INT_PTR CALLBACK DesktopPageProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)

Definition at line 338 of file desktop.c.

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  {
358  DesktopOnDestroyDialog(hwndDlg, pData);
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));
394  iIndex = PathParseIconLocation(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 }
INT WINAPI ImageList_ReplaceIcon(HIMAGELIST himl, INT nIndex, HICON hIcon)
Definition: imagelist.c:2779
#define PathUnExpandEnvStrings
Definition: shlwapi.h:1141
static HICON
Definition: imagelist.c:84
UINT uNewState
Definition: commctrl.h:3036
struct _DESKTOP_DATA * PDESKTOP_DATA
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define TRUE
Definition: types.h:120
#define ExpandEnvironmentStrings
Definition: winbase.h:3645
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
struct @208 DesktopIcons[NUM_DESKTOP_ICONS]
HWND WINAPI SetFocus(_In_opt_ HWND)
#define IDC_ICONS_LISTVIEW
Definition: resource.h:189
UINT Checkbox
Definition: desktop.c:36
#define IDC_ICONS_SETDEFAULT
Definition: resource.h:191
int32_t INT
Definition: typedefs.h:58
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
UINT code
Definition: winuser.h:3149
#define StringCchPrintf
Definition: strsafe.h:517
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI PickIconDlg(HWND hWndOwner, LPWSTR lpstrFile, UINT nMaxFile, INT *lpdwIconIndex)
Definition: dialogs.cpp:362
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define LVIS_SELECTED
Definition: commctrl.h:2319
static VOID DesktopOnInitDialog(IN HWND hwndDlg, IN PDESKTOP_DATA pData)
Definition: desktop.c:240
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define WM_DESTROY
Definition: winuser.h:1599
char TCHAR
Definition: xmlstorage.h:189
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define _countof(array)
Definition: sndvol32.h:68
static VOID DesktopOnDestroyDialog(IN HWND hwndDlg, IN PDESKTOP_DATA pData)
Definition: desktop.c:325
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define BN_CLICKED
Definition: winuser.h:1915
unsigned long DWORD
Definition: ntddk_ex.h:95
#define StringCchCopy
Definition: strsafe.h:139
#define DWLP_USER
Definition: winuser.h:866
#define PathParseIconLocation
Definition: shlwapi.h:991
static HICON GetIconFromLocation(LPTSTR szIconPath)
Definition: desktop.c:229
#define WM_COMMAND
Definition: winuser.h:1730
#define BST_UNCHECKED
Definition: winuser.h:199
HWND WINAPI GetParent(_In_ HWND)
#define TEXT(s)
Definition: k32.h:26
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
struct tagNMLISTVIEW * LPNMLISTVIEW
HICON hIcon
Definition: msconfig.c:44
LPCWSTR szPath
Definition: env.c:37
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define IDC_ICONS_CHANGEICON
Definition: resource.h:190
#define HIWORD(l)
Definition: typedefs.h:247
#define GetWindowLongPtr
Definition: treelist.c:73
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define WM_INITDIALOG
Definition: winuser.h:1729
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61

◆ GetCurrentValue()

static BOOL GetCurrentValue ( UINT  i,
BOOL  bNewStart 
)
static

Definition at line 158 of file desktop.c.

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 }
static const TCHAR szClassicStartMenu[]
Definition: desktop.c:30
struct @208 DesktopIcons[NUM_DESKTOP_ICONS]
#define StringCchCat
Definition: strsafe.h:317
static const TCHAR szNewStartPanel[]
Definition: desktop.c:31
#define FALSE
Definition: types.h:117
char TCHAR
Definition: xmlstorage.h:189
#define SHRegGetBoolUSValue
Definition: shlwapi.h:574
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
#define StringCchCopy
Definition: strsafe.h:139
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 const TCHAR szHideDesktopIcons[]
Definition: desktop.c:29

Referenced by SetDesktopSettings().

◆ GetIconFromLocation()

static HICON GetIconFromLocation ( LPTSTR  szIconPath)
static

Definition at line 229 of file desktop.c.

230 {
231  INT iIndex;
233 
235  iIndex = PathParseIconLocation(szPath);
236  return ExtractIcon(hApplet, szPath, iIndex);
237 }
#define ExpandEnvironmentStrings
Definition: winbase.h:3645
HINSTANCE hApplet
Definition: access.c:17
int32_t INT
Definition: typedefs.h:58
#define ExtractIcon
Definition: shellapi.h:686
char TCHAR
Definition: xmlstorage.h:189
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
#define PathParseIconLocation
Definition: shlwapi.h:991
LPCWSTR szPath
Definition: env.c:37

Referenced by DesktopOnInitDialog(), and DesktopPageProc().

◆ InitDesktopSettings()

VOID InitDesktopSettings ( PDESKTOP_DATA  pData)

Definition at line 63 of file desktop.c.

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 }
struct @209 IconChange[NUM_CHANGE_ICONS]
static const TCHAR szClassicStartMenu[]
Definition: desktop.c:30
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
#define HKEY_CURRENT_USER
Definition: winreg.h:11
struct @208 DesktopIcons[NUM_DESKTOP_ICONS]
#define StringCchCat
Definition: strsafe.h:317
LPCTSTR IconName
Definition: desktop.c:53
static const TCHAR szNewStartPanel[]
Definition: desktop.c:31
#define FALSE
Definition: types.h:117
static const TCHAR szUserClass[]
Definition: desktop.c:44
char TCHAR
Definition: xmlstorage.h:189
#define SHGetValue
Definition: shlwapi.h:70
#define SHRegGetBoolUSValue
Definition: shlwapi.h:574
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
static const TCHAR szSysClass[]
Definition: desktop.c:45
unsigned long DWORD
Definition: ntddk_ex.h:95
static const TCHAR szDefaultIcon[]
Definition: desktop.c:46
#define StringCchCopy
Definition: strsafe.h:139
#define lstrlen
Definition: winbase.h:3747
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 REG_EXPAND_SZ
Definition: nt_native.h:1494
unsigned int UINT
Definition: ndis.h:50
static const TCHAR szFallbackIcon[]
Definition: desktop.c:47
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
static const TCHAR szHideDesktopIcons[]
Definition: desktop.c:29
#define REG_SZ
Definition: layer.c:22

Referenced by BackgroundPageProc().

◆ SaveDesktopSettings()

BOOL SaveDesktopSettings ( PDESKTOP_DATA  pData)

Definition at line 127 of file desktop.c.

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 }
struct @209 IconChange[NUM_CHANGE_ICONS]
#define TRUE
Definition: types.h:120
struct @208 DesktopIcons[NUM_DESKTOP_ICONS]
#define FALSE
Definition: types.h:117
#define _countof(array)
Definition: sndvol32.h:68
#define StringCchCopy
Definition: strsafe.h:139
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
unsigned int UINT
Definition: ndis.h:50
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by OnCustomButton().

◆ SetCurrentValue()

static VOID SetCurrentValue ( UINT  i,
BOOL  bNewStart,
BOOL  bValue 
)
static

Definition at line 169 of file desktop.c.

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 }
static const TCHAR szClassicStartMenu[]
Definition: desktop.c:30
#define HKEY_CURRENT_USER
Definition: winreg.h:11
struct @208 DesktopIcons[NUM_DESKTOP_ICONS]
#define StringCchCat
Definition: strsafe.h:317
static const TCHAR szNewStartPanel[]
Definition: desktop.c:31
unsigned char * LPBYTE
Definition: typedefs.h:53
char TCHAR
Definition: xmlstorage.h:189
#define SHSetValue
Definition: shlwapi.h:92
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
#define StringCchCopy
Definition: strsafe.h:139
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 REG_DWORD
Definition: sdbapi.c:596
static const TCHAR szHideDesktopIcons[]
Definition: desktop.c:29

Referenced by SetDesktopSettings().

◆ SetDesktopSettings()

VOID SetDesktopSettings ( PDESKTOP_DATA  pData)

Definition at line 181 of file desktop.c.

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 
211  SHSetValue(HKEY_CURRENT_USER, iconPath, IconChange[i].IconName, dwType,
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 }
struct @209 IconChange[NUM_CHANGE_ICONS]
HWND WINAPI GetShellWindow(VOID)
Definition: desktop.c:651
#define IDS_TITLE_BIN_0
Definition: desktop.c:19
#define TRUE
Definition: types.h:120
UINT TitleId
Definition: desktop.c:52
#define HKEY_CURRENT_USER
Definition: winreg.h:11
struct @208 DesktopIcons[NUM_DESKTOP_ICONS]
#define StringCchCat
Definition: strsafe.h:317
LPCTSTR IconName
Definition: desktop.c:53
#define FALSE
Definition: types.h:117
static const TCHAR szUserClass[]
Definition: desktop.c:44
#define PostMessage
Definition: winuser.h:5822
char TCHAR
Definition: xmlstorage.h:189
#define SHSetValue
Definition: shlwapi.h:92
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
static const TCHAR szDefaultIcon[]
Definition: desktop.c:46
#define StringCchCopy
Definition: strsafe.h:139
#define WM_COMMAND
Definition: winuser.h:1730
static BOOL GetCurrentValue(UINT i, BOOL bNewStart)
Definition: desktop.c:158
#define TEXT(s)
Definition: k32.h:26
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 REG_EXPAND_SZ
Definition: nt_native.h:1494
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static VOID SetCurrentValue(UINT i, BOOL bNewStart, BOOL bValue)
Definition: desktop.c:169
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define FCIDM_DESKBROWSER_REFRESH
Definition: desktop.c:14
#define REG_SZ
Definition: layer.c:22

Referenced by BackgroundPageProc().

Variable Documentation

◆ Checkbox

UINT Checkbox

Definition at line 36 of file desktop.c.

Referenced by DesktopOnInitDialog(), and DesktopPageProc().

◆ CLSID

Definition at line 35 of file desktop.c.

◆ DesktopIcons

struct { ... } DesktopIcons[NUM_DESKTOP_ICONS]
Initial value:
= {
{TEXT("{450D8FBA-AD25-11D0-98A8-0800361B1103}"), IDC_ICONS_MYDOCS},
{TEXT("{208D2C60-3AEA-1069-A2D7-08002B30309D}"), IDC_ICONS_MYNET},
{TEXT("{20D04FE0-3AEA-1069-A2D8-08002B30309D}"), IDC_ICONS_MYCOMP},
{TEXT("{871C5380-42A0-1069-A2EA-08002B30309D}"), IDC_ICONS_INTERNET},
}
#define IDC_ICONS_MYNET
Definition: resource.h:186
#define IDC_ICONS_INTERNET
Definition: resource.h:188
#define IDC_ICONS_MYCOMP
Definition: resource.h:187
#define IDC_ICONS_MYDOCS
Definition: resource.h:185
#define TEXT(s)
Definition: k32.h:26

Referenced by DesktopOnInitDialog(), DesktopPageProc(), GetCurrentValue(), InitDesktopSettings(), SaveDesktopSettings(), SetCurrentValue(), and SetDesktopSettings().

◆ IconChange

struct { ... } IconChange[NUM_CHANGE_ICONS]
Initial value:
= {
{TEXT("{20D04FE0-3AEA-1069-A2D8-08002B30309D}"), IDS_TITLE_MYCOMP, NULL},
{TEXT("{450D8FBA-AD25-11D0-98A8-0800361B1103}"), IDS_PERSONAL, NULL},
{TEXT("{208D2C60-3AEA-1069-A2D7-08002B30309D}"), IDS_TITLE_MYNET, NULL},
{TEXT("{645FF040-5081-101B-9F08-00AA002F954E}"), IDS_TITLE_BIN_1, TEXT("Full")},
{TEXT("{645FF040-5081-101B-9F08-00AA002F954E}"), IDS_TITLE_BIN_0, TEXT("Empty")},
}
#define IDS_TITLE_BIN_0
Definition: desktop.c:19
#define IDS_TITLE_MYNET
Definition: desktop.c:17
#define IDS_TITLE_MYCOMP
Definition: desktop.c:16
#define IDS_TITLE_BIN_1
Definition: desktop.c:18
#define IDS_PERSONAL
Definition: desktop.c:27
#define TEXT(s)
Definition: k32.h:26
#define NULL
Definition: types.h:112

Referenced by DesktopOnInitDialog(), InitDesktopSettings(), SaveDesktopSettings(), and SetDesktopSettings().

◆ IconName

◆ szClassicStartMenu

const TCHAR szClassicStartMenu[] = TEXT("ClassicStartMenu")
static

Definition at line 30 of file desktop.c.

Referenced by GetCurrentValue(), InitDesktopSettings(), and SetCurrentValue().

◆ szDefaultIcon

const TCHAR szDefaultIcon[] = TEXT("\\DefaultIcon")
static

Definition at line 46 of file desktop.c.

Referenced by InitDesktopSettings(), and SetDesktopSettings().

◆ szFallbackIcon

const TCHAR szFallbackIcon[] = TEXT("%SystemRoot%\\system32\\shell32.dll,0")
static

Definition at line 47 of file desktop.c.

Referenced by InitDesktopSettings().

◆ szHideDesktopIcons

const TCHAR szHideDesktopIcons[] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\")
static

Definition at line 29 of file desktop.c.

Referenced by GetCurrentValue(), InitDesktopSettings(), and SetCurrentValue().

◆ szNewStartPanel

const TCHAR szNewStartPanel[] = TEXT("NewStartPanel")
static

Definition at line 31 of file desktop.c.

Referenced by GetCurrentValue(), InitDesktopSettings(), and SetCurrentValue().

◆ szSysClass

const TCHAR szSysClass[] = TEXT("CLSID\\")
static

Definition at line 45 of file desktop.c.

Referenced by InitDesktopSettings().

◆ szUserClass

const TCHAR szUserClass[] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\")
static

Definition at line 44 of file desktop.c.

Referenced by DesktopOnInitDialog(), InitDesktopSettings(), and SetDesktopSettings().

◆ TitleId

UINT TitleId

Definition at line 52 of file desktop.c.

Referenced by ConfirmDialog(), DesktopOnInitDialog(), and SetDesktopSettings().