Module: wine Branch: master Commit: eb36bb2e47c77dd12f098d62f471b94c7695c103 URL: http://source.winehq.org/git/wine.git/?a=commit;h=eb36bb2e47c77dd12f098d62f4...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Dec 22 17:57:42 2009 +0100
user32: Export DIALOG_get_info and DIALOG_DoDialogBox through the WoW handlers.
---
dlls/user32/controls.h | 3 +++ dlls/user32/dialog16.c | 8 ++++---- dlls/user32/msg16.c | 2 +- dlls/user32/winproc.c | 20 +++++++++++--------- dlls/user32/wnd16.c | 6 ++++-- 5 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 279dc4c..65269c5 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -116,6 +116,8 @@ struct wow_handlers32 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT); WNDPROC (*alloc_winproc)(WNDPROC,BOOL); + struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL); + INT (*dialog_box_loop)(HWND,HWND); };
extern struct wow_handlers16 wow_handlers DECLSPEC_HIDDEN; @@ -129,6 +131,7 @@ extern LRESULT ScrollBarWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HI extern LRESULT StaticWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
/* 16-bit support */ +extern struct wow_handlers32 wow_handlers32 DECLSPEC_HIDDEN; extern HWND create_window16(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT) DECLSPEC_HIDDEN; extern void free_module_classes(HINSTANCE16) DECLSPEC_HIDDEN; extern void register_wow_handlers(void) DECLSPEC_HIDDEN; diff --git a/dlls/user32/dialog16.c b/dlls/user32/dialog16.c index 95f009f..0e86a73 100644 --- a/dlls/user32/dialog16.c +++ b/dlls/user32/dialog16.c @@ -177,7 +177,7 @@ static LPCSTR DIALOG_GetControl16( LPCSTR p, DLG_CONTROL_INFO *info ) static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template, const DLG_TEMPLATE *dlgTemplate, HINSTANCE16 hInst ) { - DIALOGINFO *dlgInfo = DIALOG_get_info( hwnd, TRUE ); + DIALOGINFO *dlgInfo = wow_handlers32.get_dialog_info( hwnd, TRUE ); DLG_CONTROL_INFO info; HWND hwndCtrl, hwndDefButton = 0; INT items = dlgTemplate->nbItems; @@ -441,7 +441,7 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate, if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner); return 0; } - dlgInfo = DIALOG_get_info( hwnd, TRUE ); + dlgInfo = wow_handlers32.get_dialog_info( hwnd, TRUE ); dlgInfo->hwndFocus = 0; dlgInfo->hUserFont = hUserFont; dlgInfo->hMenu = HMENU_32( hMenu ); @@ -745,7 +745,7 @@ INT16 WINAPI DialogBoxParam16( HINSTANCE16 hInst, LPCSTR template, { HWND owner = WIN_Handle32(owner16); hwnd = DIALOG_CreateIndirect16( hInst, data, owner, dlgProc, param, TRUE ); - if (hwnd) ret = DIALOG_DoDialogBox( hwnd, owner ); + if (hwnd) ret = wow_handlers32.dialog_box_loop( hwnd, owner ); GlobalUnlock16( hmem ); } FreeResource16( hmem ); @@ -765,7 +765,7 @@ INT16 WINAPI DialogBoxIndirectParam16( HINSTANCE16 hInst, HANDLE16 dlgTemplate, if (!(ptr = GlobalLock16( dlgTemplate ))) return -1; hwnd = DIALOG_CreateIndirect16( hInst, ptr, owner, dlgProc, param, TRUE ); GlobalUnlock16( dlgTemplate ); - if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); + if (hwnd) return wow_handlers32.dialog_box_loop( hwnd, owner ); return -1; }
diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 1d96738..aef453d 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msg);
DWORD USER16_AlertableWait = 0;
-static struct wow_handlers32 wow_handlers32; +struct wow_handlers32 wow_handlers32;
static LRESULT cwp_hook_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result, void *arg ) diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 354efe0..c38c087 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -1160,15 +1160,17 @@ static int free_icon_handle( HICON handle ) */ void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, struct wow_handlers32 *orig ) { - orig->button_proc = ButtonWndProc_common; - orig->combo_proc = ComboWndProc_common; - orig->edit_proc = EditWndProc_common; - orig->listbox_proc = ListBoxWndProc_common; - orig->mdiclient_proc = MDIClientWndProc_common; - orig->scrollbar_proc = ScrollBarWndProc_common; - orig->static_proc = StaticWndProc_common; - orig->create_window = WIN_CreateWindowEx; - orig->alloc_winproc = WINPROC_AllocProc; + orig->button_proc = ButtonWndProc_common; + orig->combo_proc = ComboWndProc_common; + orig->edit_proc = EditWndProc_common; + orig->listbox_proc = ListBoxWndProc_common; + orig->mdiclient_proc = MDIClientWndProc_common; + orig->scrollbar_proc = ScrollBarWndProc_common; + orig->static_proc = StaticWndProc_common; + orig->create_window = WIN_CreateWindowEx; + orig->alloc_winproc = WINPROC_AllocProc; + orig->get_dialog_info = DIALOG_get_info; + orig->dialog_box_loop = DIALOG_DoDialogBox;
wow_handlers = *new; } diff --git a/dlls/user32/wnd16.c b/dlls/user32/wnd16.c index b4741ff..9509bd0 100644 --- a/dlls/user32/wnd16.c +++ b/dlls/user32/wnd16.c @@ -848,7 +848,8 @@ LONG WINAPI GetWindowLong16( HWND16 hwnd16, INT16 offset ) return 0; } } - else if (offset == DWLP_DLGPROC) is_winproc = (DIALOG_get_info( hwnd, FALSE ) != NULL); + else if (offset == DWLP_DLGPROC) + is_winproc = (wow_handlers32.get_dialog_info( hwnd, FALSE ) != NULL); } retvalue = GetWindowLongA( hwnd, offset ); if (is_winproc) retvalue = (LONG_PTR)WINPROC_GetProc16( (WNDPROC)retvalue, FALSE ); @@ -864,7 +865,8 @@ LONG WINAPI SetWindowLong16( HWND16 hwnd16, INT16 offset, LONG newval ) HWND hwnd = WIN_Handle32( hwnd16 ); BOOL is_winproc = (offset == GWLP_WNDPROC);
- if (offset == DWLP_DLGPROC) is_winproc = (DIALOG_get_info( hwnd, FALSE ) != NULL); + if (offset == DWLP_DLGPROC) + is_winproc = (wow_handlers32.get_dialog_info( hwnd, FALSE ) != NULL);
if (is_winproc) {