Commit 76dcb0ec authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Reimplement DefDlgProc16 using message mapping functions.

parent 0bc1eaac
......@@ -23,7 +23,7 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/winuser16.h"
#include "winuser.h"
#include "controls.h"
#include "win.h"
#include "user_private.h"
......@@ -374,59 +374,6 @@ out:
}
/***********************************************************************
* DefDlgProc (USER.308)
*/
LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
LPARAM lParam )
{
DIALOGINFO *dlgInfo;
DLGPROC16 dlgproc;
HWND hwnd32 = WIN_Handle32( hwnd );
BOOL result = FALSE;
/* Perform DIALOGINFO initialization if not done */
if(!(dlgInfo = DIALOG_get_info(hwnd32, TRUE))) return 0;
SetWindowLongPtrW( hwnd32, DWLP_MSGRESULT, 0 );
if ((dlgproc = (DLGPROC16)DEFDLG_GetDlgProc( hwnd32 ))) /* Call dialog procedure */
result = WINPROC_CallDlgProc16( dlgproc, hwnd, msg, wParam, lParam );
if (!result && IsWindow(hwnd32))
{
/* callback didn't process this message */
switch(msg)
{
case WM_ERASEBKGND:
case WM_SHOWWINDOW:
case WM_ACTIVATE:
case WM_SETFOCUS:
case DM_SETDEFID:
case DM_GETDEFID:
case WM_NEXTDLGCTL:
case WM_GETFONT:
case WM_CLOSE:
case WM_NCDESTROY:
case WM_ENTERMENULOOP:
case WM_LBUTTONDOWN:
case WM_NCLBUTTONDOWN:
return DEFDLG_Proc( hwnd32, msg, (WPARAM)wParam, lParam, dlgInfo );
case WM_INITDIALOG:
case WM_VKEYTOITEM:
case WM_COMPAREITEM:
case WM_CHARTOITEM:
break;
default:
return DefWindowProc16( hwnd, msg, wParam, lParam );
}
}
return DEFDLG_Epilog( hwnd32, msg, result);
}
/***********************************************************************
* DefDlgProcA (USER32.@)
*/
LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
......
......@@ -77,6 +77,13 @@ static LRESULT get_message_callback( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARA
return 0;
}
static LRESULT defdlg_proc_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
LRESULT *result, void *arg )
{
*result = DefDlgProcA( hwnd, msg, wp, lp );
return *result;
}
/***********************************************************************
* SendMessage (USER.111)
......@@ -270,6 +277,17 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR
/***********************************************************************
* DefDlgProc (USER.308)
*/
LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam )
{
LRESULT result;
WINPROC_CallProc16To32A( defdlg_proc_callback, hwnd, msg, wParam, lParam, &result, 0 );
return result;
}
/***********************************************************************
* PeekMessage (USER.109)
*/
BOOL16 WINAPI PeekMessage16( MSG16 *msg, HWND16 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