forked from Mirrors/wine-wine
commdlg: File open dialog: Use the specified instance handle for
custom dialog templates.oldstable
parent
cfcc9a755d
commit
62725d685c
|
@ -739,7 +739,7 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
|
||||||
HINSTANCE hinst;
|
HINSTANCE hinst;
|
||||||
if (fodInfos->ofnInfos->Flags & OFN_ENABLETEMPLATEHANDLE)
|
if (fodInfos->ofnInfos->Flags & OFN_ENABLETEMPLATEHANDLE)
|
||||||
{
|
{
|
||||||
hinst = 0;
|
hinst = COMDLG32_hInstance;
|
||||||
if( !(template = LockResource( fodInfos->ofnInfos->hInstance)))
|
if( !(template = LockResource( fodInfos->ofnInfos->hInstance)))
|
||||||
{
|
{
|
||||||
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
|
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
|
||||||
|
@ -771,7 +771,7 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hChildDlg = CreateDialogIndirectParamA(COMDLG32_hInstance, template, hwnd,
|
hChildDlg = CreateDialogIndirectParamA(hinst, template, hwnd,
|
||||||
IsHooked(fodInfos) ? (DLGPROC)fodInfos->ofnInfos->lpfnHook : FileOpenDlgProcUserTemplate,
|
IsHooked(fodInfos) ? (DLGPROC)fodInfos->ofnInfos->lpfnHook : FileOpenDlgProcUserTemplate,
|
||||||
(LPARAM)fodInfos->ofnInfos);
|
(LPARAM)fodInfos->ofnInfos);
|
||||||
if(hChildDlg)
|
if(hChildDlg)
|
||||||
|
|
Loading…
Reference in New Issue