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

commit d310503d9eccfae97aabf97bafd999e459f42301
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Fri Dec 14 20:07:33 2018 +0900
Commit:     GitHub <[email protected]>
CommitDate: Fri Dec 14 20:07:33 2018 +0900

    [EXPLORER] Set display icon of task properties (#1130)
    
    CORE-10494
---
 base/shell/explorer/trayprop.cpp | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/base/shell/explorer/trayprop.cpp b/base/shell/explorer/trayprop.cpp
index 03823ccf97..d5b075a952 100644
--- a/base/shell/explorer/trayprop.cpp
+++ b/base/shell/explorer/trayprop.cpp
@@ -245,6 +245,23 @@ public:
     }
 };
 
+static int CALLBACK
+PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
+{
+    // NOTE: This callback is needed to set large icon correctly.
+    HICON hIcon;
+    switch (uMsg)
+    {
+        case PSCB_INITIALIZED:
+        {
+            hIcon = LoadIconW(hExplorerInstance, 
MAKEINTRESOURCEW(IDI_STARTMENU));
+            SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
+            break;
+        }
+    }
+    return 0;
+}
+
 VOID
 DisplayTrayProperties(IN HWND hwndOwner, IN HWND hwndTaskbar)
 {
@@ -261,14 +278,15 @@ DisplayTrayProperties(IN HWND hwndOwner, IN HWND 
hwndTaskbar)
 
     ZeroMemory(&psh, sizeof(psh));
     psh.dwSize = sizeof(psh);
-    psh.dwFlags =  PSH_PROPTITLE;
+    psh.dwFlags =  PSH_PROPTITLE | PSH_USEICONID | PSH_USECALLBACK;
     psh.hwndParent = hwndOwner;
     psh.hInstance = hExplorerInstance;
-    psh.hIcon = NULL;
+    psh.pszIcon = MAKEINTRESOURCEW(IDI_STARTMENU);
     psh.pszCaption = caption.GetString();
     psh.nPages = _countof(hpsp);
     psh.nStartPage = 0;
     psh.phpage = hpsp;
+    psh.pfnCallback = PropSheetProc;
 
     PropertySheet(&psh);
 }

Reply via email to