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

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

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52356

Signed-off-by: Huw Davies's avatarHuw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
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)
......
Supports Markdown
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