user32: Use dispatch_win_proc_params in CallWindowProc.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a821155f21
commit
afddda2ce6
|
@ -850,6 +850,37 @@ BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void init_win_proc_params( struct win_proc_params *info, WNDPROC func, HWND hwnd, UINT msg,
|
||||||
|
WPARAM wparam, LPARAM lparam, LRESULT *result, BOOL ansi )
|
||||||
|
{
|
||||||
|
WINDOWPROC *proc;
|
||||||
|
|
||||||
|
info->hwnd = hwnd;
|
||||||
|
info->msg = msg;
|
||||||
|
info->wparam = wparam;
|
||||||
|
info->lparam = lparam;
|
||||||
|
info->result = result;
|
||||||
|
info->ansi = info->ansi_dst = ansi;
|
||||||
|
info->is_dialog = FALSE;
|
||||||
|
info->mapping = WMCHAR_MAP_CALLWINDOWPROC;
|
||||||
|
info->func = func;
|
||||||
|
|
||||||
|
if (!(proc = handle_to_proc( func )))
|
||||||
|
{
|
||||||
|
info->procW = info->procA = NULL;
|
||||||
|
}
|
||||||
|
else if (proc == WINPROC_PROC16)
|
||||||
|
{
|
||||||
|
info->procW = info->procA = WINPROC_PROC16;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
info->procA = proc->procA;
|
||||||
|
info->procW = proc->procW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* CallWindowProcA (USER32.@)
|
* CallWindowProcA (USER32.@)
|
||||||
*
|
*
|
||||||
|
@ -874,27 +905,14 @@ BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
||||||
*
|
*
|
||||||
* ECMA-234, Win32
|
* ECMA-234, Win32
|
||||||
*/
|
*/
|
||||||
LRESULT WINAPI CallWindowProcA(
|
LRESULT WINAPI CallWindowProcA( WNDPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||||
WNDPROC func, /* [in] window procedure */
|
{
|
||||||
HWND hwnd, /* [in] target window */
|
struct win_proc_params params;
|
||||||
UINT msg, /* [in] message */
|
|
||||||
WPARAM wParam, /* [in] message dependent parameter */
|
|
||||||
LPARAM lParam /* [in] message dependent parameter */
|
|
||||||
) {
|
|
||||||
WINDOWPROC *proc;
|
|
||||||
LRESULT result;
|
LRESULT result;
|
||||||
|
|
||||||
if (!func) return 0;
|
if (!func) return 0;
|
||||||
|
init_win_proc_params( ¶ms, func, hwnd, msg, wParam, lParam, &result, TRUE );
|
||||||
if (!(proc = handle_to_proc( func )))
|
dispatch_win_proc_params( ¶ms );
|
||||||
call_window_proc( hwnd, msg, wParam, lParam, &result, func );
|
|
||||||
else if (proc == WINPROC_PROC16)
|
|
||||||
wow_handlers.call_window_proc( hwnd, msg, wParam, lParam, &result, func );
|
|
||||||
else if (proc->procA)
|
|
||||||
call_window_proc( hwnd, msg, wParam, lParam, &result, proc->procA );
|
|
||||||
else
|
|
||||||
WINPROC_CallProcAtoW( call_window_proc, hwnd, msg, wParam, lParam, &result,
|
|
||||||
proc->procW, WMCHAR_MAP_CALLWINDOWPROC );
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,22 +922,14 @@ LRESULT WINAPI CallWindowProcA(
|
||||||
*
|
*
|
||||||
* See CallWindowProcA.
|
* See CallWindowProcA.
|
||||||
*/
|
*/
|
||||||
LRESULT WINAPI CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg,
|
LRESULT WINAPI CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||||
WPARAM wParam, LPARAM lParam )
|
|
||||||
{
|
{
|
||||||
WINDOWPROC *proc;
|
struct win_proc_params params;
|
||||||
LRESULT result;
|
LRESULT result;
|
||||||
|
|
||||||
if (!func) return 0;
|
if (!func) return 0;
|
||||||
|
init_win_proc_params( ¶ms, func, hwnd, msg, wParam, lParam, &result, FALSE );
|
||||||
if (!(proc = handle_to_proc( func )))
|
dispatch_win_proc_params( ¶ms );
|
||||||
call_window_proc( hwnd, msg, wParam, lParam, &result, func );
|
|
||||||
else if (proc == WINPROC_PROC16)
|
|
||||||
WINPROC_CallProcWtoA( wow_handlers.call_window_proc, hwnd, msg, wParam, lParam, &result, func );
|
|
||||||
else if (proc->procW)
|
|
||||||
call_window_proc( hwnd, msg, wParam, lParam, &result, proc->procW );
|
|
||||||
else
|
|
||||||
WINPROC_CallProcWtoA( call_window_proc, hwnd, msg, wParam, lParam, &result, proc->procA );
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue