Alexandre Julliard : shell32: Use the module instance instead of that of the owner window for the about dialog .

Alexandre Julliard julliard at winehq.org
Mon Dec 21 09:39:46 CST 2009


Module: wine
Branch: master
Commit: 29c0ecfd1ccaf831f39f12a6d6630ac94f1eca75
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=29c0ecfd1ccaf831f39f12a6d6630ac94f1eca75

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Dec 21 11:20:04 2009 +0100

shell32: Use the module instance instead of that of the owner window for the about dialog.

---

 dlls/shell32/shell32_main.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index 91795b9..2d0f0b7 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -1043,18 +1043,12 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
 {
     ABOUT_INFO info;
     LOGFONTW logFont;
-    HRSRC hRes;
-    LPVOID template;
     BOOL bRet;
     static const WCHAR wszSHELL_ABOUT_MSGBOX[] =
         {'S','H','E','L','L','_','A','B','O','U','T','_','M','S','G','B','O','X',0};
 
     TRACE("\n");
 
-    if(!(hRes = FindResourceW(shell32_hInstance, wszSHELL_ABOUT_MSGBOX, (LPWSTR)RT_DIALOG)))
-        return FALSE;
-    if(!(template = LoadResource(shell32_hInstance, hRes)))
-        return FALSE;
     if (!hIcon) hIcon = LoadImageW( 0, (LPWSTR)IDI_WINLOGO, IMAGE_ICON, 48, 48, LR_SHARED );
     info.szApp        = szApp;
     info.szOtherStuff = szOtherStuff;
@@ -1063,8 +1057,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
     SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
     info.hFont = CreateFontIndirectW( &logFont );
 
-    bRet = DialogBoxIndirectParamW((HINSTANCE)GetWindowLongPtrW( hWnd, GWLP_HINSTANCE ),
-                                   template, hWnd, AboutDlgProc, (LPARAM)&info );
+    bRet = DialogBoxParamW( shell32_hInstance, wszSHELL_ABOUT_MSGBOX, hWnd, AboutDlgProc, (LPARAM)&info );
     DeleteObject(info.hFont);
     return bRet;
 }




More information about the wine-cvs mailing list