Commit 8e5774ea authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

user: Copy back the 16-bit MDICREATESTRUCT.

Otherwise lpCreateParams is overwitten by CREATESTRUCT32Ato16(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52356Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 691c7775
...@@ -610,6 +610,7 @@ LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT1 ...@@ -610,6 +610,7 @@ LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT1
CREATESTRUCT16 *cs16 = MapSL(lParam); CREATESTRUCT16 *cs16 = MapSL(lParam);
CREATESTRUCTA cs; CREATESTRUCTA cs;
MDICREATESTRUCTA mdi_cs; MDICREATESTRUCTA mdi_cs;
SEGPTR mdi_cs_segptr = 0;
CREATESTRUCT16to32A( cs16, &cs ); CREATESTRUCT16to32A( cs16, &cs );
if (GetWindowLongW(hwnd32, GWL_EXSTYLE) & WS_EX_MDICHILD) if (GetWindowLongW(hwnd32, GWL_EXSTYLE) & WS_EX_MDICHILD)
...@@ -617,9 +618,15 @@ LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT1 ...@@ -617,9 +618,15 @@ LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT1
MDICREATESTRUCT16 *mdi_cs16 = MapSL(cs16->lpCreateParams); MDICREATESTRUCT16 *mdi_cs16 = MapSL(cs16->lpCreateParams);
MDICREATESTRUCT16to32A(mdi_cs16, &mdi_cs); MDICREATESTRUCT16to32A(mdi_cs16, &mdi_cs);
cs.lpCreateParams = &mdi_cs; cs.lpCreateParams = &mdi_cs;
mdi_cs_segptr = cs16->lpCreateParams;
} }
ret = callback( hwnd32, msg, wParam, (LPARAM)&cs, result, arg ); ret = callback( hwnd32, msg, wParam, (LPARAM)&cs, result, arg );
CREATESTRUCT32Ato16( &cs, cs16 ); CREATESTRUCT32Ato16( &cs, cs16 );
if (mdi_cs_segptr)
{
MDICREATESTRUCT32Ato16( &mdi_cs, MapSL( mdi_cs_segptr ) );
cs16->lpCreateParams = mdi_cs_segptr;
}
} }
break; break;
case WM_MDICREATE: case WM_MDICREATE:
......
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