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

This commit is contained in:
Alexandre Julliard 2009-12-21 11:20:04 +01:00
parent ff0d84d4a3
commit 29c0ecfd1c
1 changed files with 1 additions and 8 deletions

View File

@ -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;
}