https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c069e5c122280670b264ec8032c614bc946662ce

commit c069e5c122280670b264ec8032c614bc946662ce
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Tue Jan 28 14:05:51 2020 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Tue Jan 28 14:05:51 2020 +0900

    [CPL][DESK] Use shell32 icon directly; follow-up to #2281
---
 dll/cpl/desk/background.c       |   7 ++++++-
 dll/cpl/desk/desk.rc            |   1 -
 dll/cpl/desk/resource.h         |   1 -
 dll/cpl/desk/resources/none.ico | Bin 23558 -> 0 bytes
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dll/cpl/desk/background.c b/dll/cpl/desk/background.c
index f73cdcb9d19..34a42d27c08 100644
--- a/dll/cpl/desk/background.c
+++ b/dll/cpl/desk/background.c
@@ -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);
 
diff --git a/dll/cpl/desk/desk.rc b/dll/cpl/desk/desk.rc
index 60352eda891..08301b0fee7 100644
--- a/dll/cpl/desk/desk.rc
+++ b/dll/cpl/desk/desk.rc
@@ -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"
 
diff --git a/dll/cpl/desk/resource.h b/dll/cpl/desk/resource.h
index bbe32ea6469..816ab45311f 100644
--- a/dll/cpl/desk/resource.h
+++ b/dll/cpl/desk/resource.h
@@ -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
 
diff --git a/dll/cpl/desk/resources/none.ico b/dll/cpl/desk/resources/none.ico
deleted file mode 100644
index f306984bdb4..00000000000
Binary files a/dll/cpl/desk/resources/none.ico and /dev/null differ

Reply via email to