mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[CPL][DESK] Use shell32 icon directly; follow-up to #2281
This commit is contained in:
parent
cc794e564a
commit
c069e5c122
4 changed files with 6 additions and 3 deletions
|
@ -309,6 +309,7 @@ AddListViewItems(HWND hwndDlg, PBACKGROUND_DATA pData)
|
|||
HRESULT hr;
|
||||
HICON hIcon;
|
||||
INT cx, cy;
|
||||
HINSTANCE hShell32;
|
||||
|
||||
hwndBackgroundList = GetDlgItem(hwndDlg, IDC_BACKGROUND_LIST);
|
||||
|
||||
|
@ -317,7 +318,11 @@ AddListViewItems(HWND hwndDlg, PBACKGROUND_DATA pData)
|
|||
cx = GetSystemMetrics(SM_CXSMICON);
|
||||
cy = GetSystemMetrics(SM_CYSMICON);
|
||||
himl = ImageList_Create(cx, cy, ILC_COLOR32 | ILC_MASK, 0, 0);
|
||||
hIcon = (HICON)LoadImageW(hApplet, MAKEINTRESOURCEW(IDI_NONE), IMAGE_ICON, cx, cy, 0);
|
||||
|
||||
/* Load (None) icon */
|
||||
hShell32 = LoadLibraryEx(L"shell32", NULL, LOAD_LIBRARY_AS_DATAFILE);
|
||||
hIcon = (HICON)LoadImageW(hShell32, MAKEINTRESOURCEW(200), IMAGE_ICON, cx, cy, 0);
|
||||
FreeLibrary(hShell32);
|
||||
|
||||
ListView_SetImageList(hwndBackgroundList, himl, LVSIL_SMALL);
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
|
||||
IDC_DESK_ICON ICON "resources/applet.ico"
|
||||
IDC_DESK_ICON2 ICON "resources/applet.ico"
|
||||
IDI_NONE ICON "resources/none.ico"
|
||||
|
||||
IDC_MONITOR BITMAP "resources/monitor.bmp"
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/* ids */
|
||||
#define IDC_DESK_ICON 40
|
||||
#define IDC_DESK_ICON2 100 /* Needed for theme compatability with Windows. */
|
||||
#define IDI_NONE 101
|
||||
|
||||
#define IDC_STATIC -1
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
Loading…
Reference in a new issue