commdlg: File open dialog: Use the specified instance handle for

custom dialog templates.
oldstable
Michael Kaufmann 2006-02-02 13:20:23 +01:00 committed by Alexandre Julliard
parent cfcc9a755d
commit 62725d685c
1 changed files with 2 additions and 2 deletions

View File

@ -739,7 +739,7 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
HINSTANCE hinst;
if (fodInfos->ofnInfos->Flags & OFN_ENABLETEMPLATEHANDLE)
{
hinst = 0;
hinst = COMDLG32_hInstance;
if( !(template = LockResource( fodInfos->ofnInfos->hInstance)))
{
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
@ -771,7 +771,7 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
return NULL;
}
}
hChildDlg = CreateDialogIndirectParamA(COMDLG32_hInstance, template, hwnd,
hChildDlg = CreateDialogIndirectParamA(hinst, template, hwnd,
IsHooked(fodInfos) ? (DLGPROC)fodInfos->ofnInfos->lpfnHook : FileOpenDlgProcUserTemplate,
(LPARAM)fodInfos->ofnInfos);
if(hChildDlg)