From: Katayama Hirofumi MZ Date: Tue, 28 Jan 2020 05:05:51 +0000 (+0900) Subject: [CPL][DESK] Use shell32 icon directly; follow-up to #2281 X-Git-Tag: 0.4.14-RC~705 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=c069e5c122280670b264ec8032c614bc946662ce [CPL][DESK] Use shell32 icon directly; follow-up to #2281 --- 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