win32u: Partially move ScrollBarWndProc implementation from user32.

This commit is contained in:
Jacek Caban 2022-06-28 20:52:31 +02:00 committed by Alexandre Julliard
parent b4ba6de6e1
commit 22cab055e4
5 changed files with 35 additions and 3 deletions

View file

@ -1513,10 +1513,8 @@ LRESULT WINAPI USER_ScrollBarProc( HWND hwnd, UINT message, WPARAM wParam, LPARA
break;
case WM_ERASEBKGND:
return 1;
case WM_GETDLGCODE:
return DLGC_WANTARROWS; /* Windows returns this value */
return NtUserMessageCall( hwnd, message, wParam, lParam, 0, NtUserScrollBarWndProc, !unicode );
case WM_PAINT:
{

View file

@ -2889,17 +2889,25 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
{
switch (type)
{
case NtUserScrollBarWndProc:
return scroll_bar_window_proc( hwnd, msg, wparam, lparam, ansi );
case NtUserPopupMenuWndProc:
return popup_menu_window_proc( hwnd, msg, wparam, lparam );
case NtUserDesktopWindowProc:
return desktop_window_proc( hwnd, msg, wparam, lparam );
case NtUserDefWindowProc:
return default_window_proc( hwnd, msg, wparam, lparam, ansi );
case NtUserCallWindowProc:
return init_win_proc_params( (struct win_proc_params *)result_info, hwnd, msg,
wparam, lparam, ansi );
case NtUserSendMessage:
return send_window_message( hwnd, msg, wparam, lparam, ansi );
case NtUserSendMessageTimeout:
{
struct send_message_timeout_params *params = (void *)result_info;
@ -2908,18 +2916,24 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
params->timeout, &res, ansi );
return res;
}
case NtUserSendNotifyMessage:
return send_notify_message( hwnd, msg, wparam, lparam, ansi );
case NtUserSendMessageCallback:
return send_message_callback( hwnd, msg, wparam, lparam, (void *)result_info, ansi );
case NtUserClipboardWindowProc:
return user_driver->pClipboardWindowProc( hwnd, msg, wparam, lparam );
case NtUserSpyEnter:
spy_enter_message( ansi, hwnd, msg, wparam, lparam );
return 0;
case NtUserSpyExit:
spy_exit_message( ansi, hwnd, msg, (LPARAM)result_info, wparam, lparam );
return 0;
default:
FIXME( "%p %x %lx %lx %p %x %x\n", hwnd, msg, wparam, lparam, result_info, type, ansi );
}

View file

@ -68,6 +68,21 @@ static BOOL show_scroll_bar( HWND hwnd, int bar, BOOL show_horz, BOOL show_vert
return FALSE; /* no frame changes */
}
LRESULT scroll_bar_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi )
{
switch (msg)
{
case WM_ERASEBKGND:
return 1;
case WM_GETDLGCODE:
return DLGC_WANTARROWS; /* Windows returns this value */
default:
return default_window_proc( hwnd, msg, wparam, lparam, ansi );
}
}
/*************************************************************************
* NtUserShowScrollBar (win32u.@)
*/

View file

@ -440,6 +440,10 @@ extern LRESULT send_message_timeout( HWND hwnd, UINT msg, WPARAM wparam, LPARAM
extern BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data ) DECLSPEC_HIDDEN;
extern BOOL rawinput_device_get_usages( HANDLE handle, USHORT *usage_page, USHORT *usage ) DECLSPEC_HIDDEN;
/* scroll.c */
extern LRESULT scroll_bar_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
BOOL ansi ) DECLSPEC_HIDDEN;
/* sysparams.c */
extern BOOL enable_thunk_lock DECLSPEC_HIDDEN;
extern DWORD process_layout DECLSPEC_HIDDEN;

View file

@ -211,6 +211,7 @@ struct render_synthesized_format_params
/* NtUserMessageCall codes */
enum
{
NtUserScrollBarWndProc = 0x029a,
NtUserPopupMenuWndProc = 0x029c,
NtUserDesktopWindowProc = 0x029d,
NtUserDefWindowProc = 0x029e,