Commit 691c7775 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

commdlg: Pass the 16-bit structure to the WM_INITDIALOG hook.

parent 9dd1654c
......@@ -482,6 +482,12 @@ static UINT_PTR CALLBACK call_hook_proc( WNDPROC16 hook, HWND hwnd, UINT msg, WP
case WM_ACTIVATEAPP:
ret = call_hook16( hook, hwnd, msg, wp, HTASK_16( lp ));
break;
case WM_INITDIALOG:
{
OPENFILENAMEA *ofn = (OPENFILENAMEA *)lp;
ret = call_hook16( hook, hwnd, msg, wp, ofn->lCustData );
break;
}
default:
ret = call_hook16( hook, hwnd, msg, wp, lp );
break;
......@@ -591,7 +597,7 @@ BOOL16 WINAPI GetOpenFileName16( SEGPTR ofn ) /* [in/out] address of structure w
ofn32.nFileOffset = lpofn->nFileOffset;
ofn32.nFileExtension = lpofn->nFileExtension;
ofn32.lpstrDefExt = MapSL( lpofn->lpstrDefExt );
ofn32.lCustData = lpofn->lCustData;
ofn32.lCustData = ofn; /* See WM_INITDIALOG in the hook proc */
ofn32.lpfnHook = dummy_hook; /* this is to force old 3.1 dialog style */
if (lpofn->Flags & OFN_ENABLETEMPLATE)
......
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