Commit e365a233 authored by NF Stevens's avatar NF Stevens Committed by Alexandre Julliard

Fix the return type of DLGPROC type and mask out the unset highword of

the return when a 16 bit dialog proc is called.
parent 86240453
......@@ -210,8 +210,8 @@ DECLARE_HANDLE(HRASCONN);
typedef BOOL32 (CALLBACK* DATEFMT_ENUMPROC32A)(LPSTR);
typedef BOOL32 (CALLBACK* DATEFMT_ENUMPROC32W)(LPWSTR);
DECL_WINELIB_TYPE_AW(DATEFMT_ENUMPROC)
typedef LRESULT (CALLBACK *DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
typedef LRESULT (CALLBACK *DLGPROC32)(HWND32,UINT32,WPARAM32,LPARAM);
typedef BOOL16 (CALLBACK *DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
typedef BOOL32 (CALLBACK *DLGPROC32)(HWND32,UINT32,WPARAM32,LPARAM);
DECL_WINELIB_TYPE(DLGPROC)
typedef LRESULT (CALLBACK *DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
typedef LRESULT (CALLBACK *DRIVERPROC32)(DWORD,HDRVR32,UINT32,LPARAM,LPARAM);
......
......@@ -263,12 +263,15 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
if (dlgInfo->dlgProc) { /* Call dialog procedure */
result = CallWindowProc16( (WNDPROC16)dlgInfo->dlgProc,
hwnd, msg, wParam, lParam );
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
/* 16 bit dlg procs only return BOOL16 */
if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 )
result = LOWORD(result);
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
}
if (!result && IsWindow32(hwnd))
......@@ -323,12 +326,15 @@ LRESULT WINAPI DefDlgProc32A( HWND32 hwnd, UINT32 msg,
if (dlgInfo->dlgProc) { /* Call dialog procedure */
result = CallWindowProc32A( (WNDPROC32)dlgInfo->dlgProc,
hwnd, msg, wParam, lParam );
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
/* 16 bit dlg procs only return BOOL16 */
if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 )
result = LOWORD(result);
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
}
if (!result && IsWindow32(hwnd))
......@@ -383,12 +389,15 @@ LRESULT WINAPI DefDlgProc32W( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
if (dlgInfo->dlgProc) { /* Call dialog procedure */
result = CallWindowProc32W( (WNDPROC32)dlgInfo->dlgProc,
hwnd, msg, wParam, lParam );
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
/* 16 bit dlg procs only return BOOL16 */
if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 )
result = LOWORD(result);
/* Check if window was destroyed by dialog procedure */
if (dlgInfo->flags & DF_END && !(dlgInfo->flags & DF_ENDING)) {
dlgInfo->flags |= DF_ENDING;
DestroyWindow32( hwnd );
}
}
if (!result && IsWindow32(hwnd))
......
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