reactos/dll/win32/shell32/wine
Oleg Dubinskiy f9a5344254
[SHELL32] Allow using custom desktop/folders/drives icons (#6421)
Implement proper reading the current user's icons from registry.

CORE-14758

- Load the icons specified by user in registry in the following keys:
  "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\DefaultIcon"
  (virtual namespace folders)
  "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons"
  (filesystem folders and drives)
- Implement two functions HCU/HLM_GetIconW for reading the icons
  from mentioned HKCU and HKLM keys accordingly.
- Use HCR_RegGetIconW for falling back to default icons.
  This function always loads only default icons, even when
  the custom ones are specified by user.
- Refactor SIC_LoadOverlayIcon to use newly implemented HLM_GetIconW.

These changes apply to:
- virtual namespace folders and other desktop items (like My Computer,
  My Documents, Network Places, Recycle Bin, Web Browser (aka Internet
  Explorer), Control Panel and some of its items);
- normal filesystem directories;
- all types of drives (fixed disk drives, removable drives, CD-ROMs,
  RamDisks and network drives). Handle invalid drives, setting blank
  icon for them, since they cannot be recognized or mounted correctly.
  Also, load the autorun icons first to avoid overriding them by the
  icons defined in registry.

I've rechecked twice: excluding Start Menu icons, Desktop Workspace icon
and some FS folder icons that have their own desktop.ini configuration
files (we probably should write the custom icons we load to these configs,
as Windows does it, perhaps with WritePrivateProfileStringW), all other
icons can be changed now (only ones that can be changed on XP SP3 / 2003
SP2) via built-in system tools (like Desktop icons in desk.cpl) or any
3rd-party tools without modifying system resources.

Also all icons for the known file types can be changed,
same as before my changes.

Regarding Start Menu icons:
- changing them should be correctly implemented in explorer
  instead of shell32, as the former is responsible for the Start Menu
  and partially for the taskbar;
- in order to actually use all of them, we need to implement modern
  Start Menu first.

Useful reference: http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0162.htm
2024-02-29 00:20:47 +03:00
..
appbar.c [Explorer|Shell32] 2020-03-21 19:13:55 -05:00
brsfolder.c [SHELL32] SHBrowseForFolder: Fix pszDisplayName (#6549) 2024-02-28 13:23:27 +09:00
classes.c [SHELL32] Allow using custom desktop/folders/drives icons (#6421) 2024-02-29 00:20:47 +03:00
clipboard.c
control.c [SHELL32] Fix taskbar large icon for control panel applets 2023-08-03 16:43:08 +07:00
cpanel.h
pidl.c [SHELL32][SHELL32_APITEST][SDK] Implement PathIsEqualOrSubFolder (#5714) 2023-11-29 22:50:01 +09:00
pidl.h [SHELL32] Add multiple status bar parts to the file browser (#4401) 2022-05-03 16:52:23 +03:00
shell32_main.c [SHELL32][SHELL32_APITEST] Improve CommandLineToArgvW (#5055) 2023-02-14 20:53:48 +09:00
shell32_main.h [SHELL32] Allow using custom desktop/folders/drives icons (#6421) 2024-02-29 00:20:47 +03:00
shellole.c [SHELL32] Use wide char string literals. 2022-01-09 22:39:29 +01:00
shellord.c [SHELL32][SDK][SHELL32_APITEST] Add PathIsTemporaryA/W (#6067) 2023-12-02 23:07:28 +09:00
shellpath.c [SHELL32] Implement IsLFNDriveA/W and improve PathResolve (#4866) 2022-11-10 23:18:04 +09:00
shellreg.c [SHELL32] shlexec: Initial support of App Paths (#4850) 2022-11-08 09:23:06 +09:00
shellstring.c [SHELL32] Use wide char string literals. 2022-01-09 22:39:29 +01:00
shlmenu.c [SHELL32] Use wide char string literals. 2022-01-09 22:39:29 +01:00
shpolicy.c [SHELL32] Use wide char string literals. 2022-01-09 22:39:29 +01:00