user32: Pre-allocate the window procedure for the scrollbar class.

This commit is contained in:
Alexandre Julliard 2009-12-17 12:59:40 +01:00
parent c0f3f5a1d2
commit 1e43d19753
3 changed files with 20 additions and 26 deletions

View File

@ -37,6 +37,7 @@ enum builtin_winprocs
WINPROC_COMBO,
WINPROC_EDIT,
WINPROC_LISTBOX,
WINPROC_SCROLLBAR,
NB_BUILTIN_WINPROCS
};

View File

@ -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.@)
*

View File

@ -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.@)