From 62725d685c769d1b5c38c8ae56f4128ced649bf0 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Thu, 2 Feb 2006 13:20:23 +0100 Subject: [PATCH] commdlg: File open dialog: Use the specified instance handle for custom dialog templates. --- dlls/commdlg/filedlg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c index 014e9f3e94e..e4a04634921 100644 --- a/dlls/commdlg/filedlg.c +++ b/dlls/commdlg/filedlg.c @@ -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)