user32: Reimplement DefDlgProc16 using message mapping functions.
This commit is contained in:
parent
0bc1eaac76
commit
76dcb0ecb9
|
@ -23,7 +23,7 @@
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "wine/winuser16.h"
|
#include "winuser.h"
|
||||||
#include "controls.h"
|
#include "controls.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "user_private.h"
|
#include "user_private.h"
|
||||||
|
@ -373,59 +373,6 @@ out:
|
||||||
return dlgInfo;
|
return dlgInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* 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.@)
|
* DefDlgProcA (USER32.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -77,6 +77,13 @@ static LRESULT get_message_callback( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARA
|
||||||
return 0;
|
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)
|
* SendMessage (USER.111)
|
||||||
|
@ -269,6 +276,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)
|
* PeekMessage (USER.109)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue