diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index d5760d67141..274e59f49ea 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -37,6 +37,7 @@ enum builtin_winprocs WINPROC_COMBO, WINPROC_EDIT, WINPROC_LISTBOX, + WINPROC_SCROLLBAR, NB_BUILTIN_WINPROCS }; diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index b948c82fc00..13b5eafb82a 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -114,8 +114,6 @@ static void SCROLL_DrawInterior_9x( HWND hwnd, HDC hdc, INT nBar, INT thumbSize, INT thumbPos, UINT flags, BOOL vertical, BOOL top_selected, BOOL bottom_selected ); -static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); -static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); /********************************************************************* @@ -126,8 +124,8 @@ const struct builtin_class_descr SCROLL_builtin_class = { scrollbarW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ - ScrollBarWndProcA, /* procA */ - ScrollBarWndProcW, /* procW */ + NULL, /* procA */ + BUILTIN_WINPROC(WINPROC_SCROLLBAR), /* procW */ sizeof(SCROLLBAR_INFO), /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ @@ -1574,24 +1572,6 @@ LRESULT ScrollBarWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM } -/*********************************************************************** - * ScrollBarWndProcA - */ -static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) -{ - return wow_handlers.scrollbar_proc( hwnd, message, wParam, lParam, FALSE ); -} - - -/*********************************************************************** - * ScrollBarWndProcW - */ -static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) -{ - return wow_handlers.scrollbar_proc( hwnd, message, wParam, lParam, TRUE ); -} - - /************************************************************************* * SetScrollInfo (USER32.@) * diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 96c4749b9c0..c9ed5579103 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -57,13 +57,16 @@ LRESULT WINAPI EditWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) static LRESULT WINAPI EditWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ListBoxWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ListBoxWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static WINDOWPROC winproc_array[MAX_WINPROCS] = { - { ButtonWndProcA, ButtonWndProcW }, /* WINPROC_BUTTON */ - { ComboWndProcA, ComboWndProcW }, /* WINPROC_COMBO */ - { EditWndProcA, EditWndProcW }, /* WINPROC_EDIT */ - { ListBoxWndProcA, ListBoxWndProcW },/* WINPROC_LISTBOX */ + { ButtonWndProcA, ButtonWndProcW }, /* WINPROC_BUTTON */ + { ComboWndProcA, ComboWndProcW }, /* WINPROC_COMBO */ + { EditWndProcA, EditWndProcW }, /* WINPROC_EDIT */ + { ListBoxWndProcA, ListBoxWndProcW }, /* WINPROC_LISTBOX */ + { ScrollBarWndProcA, ScrollBarWndProcW }, /* WINPROC_SCROLLBAR */ }; static UINT builtin_used = NB_BUILTIN_WINPROCS; @@ -1089,6 +1092,16 @@ static LRESULT WINAPI ListBoxWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARA return wow_handlers.listbox_proc( hwnd, msg, wParam, lParam, TRUE ); } +static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + return wow_handlers.scrollbar_proc( hwnd, msg, wParam, lParam, FALSE ); +} + +static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + return wow_handlers.scrollbar_proc( hwnd, msg, wParam, lParam, TRUE ); +} + /********************************************************************** * UserRegisterWowHandlers (USER32.@)