mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
Fix the return type of DLGPROC type and mask out the unset highword of
the return when a 16 bit dialog proc is called.
This commit is contained in:
parent
862404537e
commit
e365a23341
2 changed files with 26 additions and 17 deletions
|
@ -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 );
|
||||
/* 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 );
|
||||
}
|
||||
/* 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 );
|
||||
/* 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 );
|
||||
}
|
||||
/* 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 );
|
||||
/* 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 );
|
||||
}
|
||||
/* 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))
|
||||
|
|
Loading…
Reference in a new issue