https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7244a4a2f5a53571b7e3a2...
commit 7244a4a2f5a53571b7e3a287c860e1277ea902d3 Author: Thamatip Chitpong tangaming123456@outlook.com AuthorDate: Mon Sep 19 05:56:35 2022 +0700 Commit: GitHub noreply@github.com CommitDate: Mon Sep 19 01:56:35 2022 +0300
[ZIPFLDR] Set large icon correctly (#4708)
Now it's correctly displayed in Alt+Tab window selection. --- dll/shellext/zipfldr/CZipExtract.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/dll/shellext/zipfldr/CZipExtract.cpp b/dll/shellext/zipfldr/CZipExtract.cpp index 24a744f2e2d..20a8087a029 100644 --- a/dll/shellext/zipfldr/CZipExtract.cpp +++ b/dll/shellext/zipfldr/CZipExtract.cpp @@ -331,10 +331,23 @@ public: };
+ /* NOTE: This callback is needed to set large icon correctly. */ + static INT CALLBACK s_PropSheetCallbackProc(HWND hwndDlg, UINT uMsg, LPARAM lParam) + { + if (uMsg == PSCB_INITIALIZED) + { + HICON hIcon = LoadIconW(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(IDI_ZIPFLDR)); + CWindow dlg(hwndDlg); + dlg.SetIcon(hIcon, TRUE); + } + + return 0; + } + void runWizard() { PROPSHEETHEADERW psh = { sizeof(psh), 0 }; - psh.dwFlags = PSH_WIZARD97 | PSH_HEADER | PSH_USEICONID; + psh.dwFlags = PSH_WIZARD97 | PSH_HEADER | PSH_USEICONID | PSH_USECALLBACK; psh.hInstance = _AtlBaseModule.GetResourceInstance();
CExtractSettingsPage extractPage(this, &m_Password); @@ -350,6 +363,7 @@ public: psh.pszIcon = MAKEINTRESOURCE(IDI_ZIPFLDR); psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK); psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER); + psh.pfnCallback = s_PropSheetCallbackProc;
PropertySheetW(&psh); }