Commit 29c0ecfd authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent ff0d84d4
...@@ -1043,18 +1043,12 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, ...@@ -1043,18 +1043,12 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
{ {
ABOUT_INFO info; ABOUT_INFO info;
LOGFONTW logFont; LOGFONTW logFont;
HRSRC hRes;
LPVOID template;
BOOL bRet; BOOL bRet;
static const WCHAR wszSHELL_ABOUT_MSGBOX[] = static const WCHAR wszSHELL_ABOUT_MSGBOX[] =
{'S','H','E','L','L','_','A','B','O','U','T','_','M','S','G','B','O','X',0}; {'S','H','E','L','L','_','A','B','O','U','T','_','M','S','G','B','O','X',0};
TRACE("\n"); 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 ); if (!hIcon) hIcon = LoadImageW( 0, (LPWSTR)IDI_WINLOGO, IMAGE_ICON, 48, 48, LR_SHARED );
info.szApp = szApp; info.szApp = szApp;
info.szOtherStuff = szOtherStuff; info.szOtherStuff = szOtherStuff;
...@@ -1063,8 +1057,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, ...@@ -1063,8 +1057,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 ); SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
info.hFont = CreateFontIndirectW( &logFont ); info.hFont = CreateFontIndirectW( &logFont );
bRet = DialogBoxIndirectParamW((HINSTANCE)GetWindowLongPtrW( hWnd, GWLP_HINSTANCE ), bRet = DialogBoxParamW( shell32_hInstance, wszSHELL_ABOUT_MSGBOX, hWnd, AboutDlgProc, (LPARAM)&info );
template, hWnd, AboutDlgProc, (LPARAM)&info );
DeleteObject(info.hFont); DeleteObject(info.hFont);
return bRet; return bRet;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment