[PATCH] shell32: RunFileDlg: allow custom icon

Mikołaj Zalewski mikolaj at zalewski.pl
Mon Jun 30 11:15:33 CDT 2008


---
 dlls/shell32/dialogs.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c
index 0e858b8..a30cf33 100644
--- a/dlls/shell32/dialogs.c
+++ b/dlls/shell32/dialogs.c
@@ -139,9 +139,11 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
             if (prfdp->uFlags & RFF_CALCDIRECTORY)
                 FIXME("RFF_CALCDIRECTORY not supported\n");
 
+            if (prfdp->hIcon == NULL)
+                prfdp->hIcon = (WPARAM)LoadIconW(NULL, (LPCWSTR)IDI_WINLOGO);
             SetClassLongPtrW (hwnd, GCLP_HICON, (LPARAM)prfdp->hIcon) ;
-            SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_ICON), STM_SETICON,
-                          (WPARAM)LoadIconW (NULL, (LPCWSTR)IDI_WINLOGO), 0);
+            SendMessageW(GetDlgItem(hwnd, IDC_RUNDLG_ICON), STM_SETICON, (WPARAM)prfdp->hIcon, 0);
+
             FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL, (prfdp->uFlags & RFF_NODEFAULT) == 0) ;
             SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH)) ;
             return TRUE ;
-- 
1.5.4


--------------070903070702020106040508--



More information about the wine-patches mailing list