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

This commit is contained in:
Alexandre Julliard 2009-12-17 12:57:22 +01:00
parent 87f83f8618
commit 05cf0ff29f
3 changed files with 18 additions and 26 deletions

View File

@ -86,9 +86,6 @@ static UINT CBitHeight, CBitWidth;
#define COMBO_EDITBUTTONSPACE() 0
#define EDIT_CONTROL_PADDING() 1
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
/*********************************************************************
* combo class descriptor
*/
@ -97,8 +94,8 @@ const struct builtin_class_descr COMBO_builtin_class =
{
comboboxW, /* name */
CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */
ComboWndProcA, /* procA */
ComboWndProcW, /* procW */
NULL, /* procA */
BUILTIN_WINPROC(WINPROC_COMBO), /* procW */
sizeof(HEADCOMBO *), /* extra */
IDC_ARROW, /* cursor */
0 /* brush */
@ -1839,6 +1836,8 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
TRACE("[%p]: msg %s wp %08lx lp %08lx\n",
hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
if (!IsWindow(hwnd)) return 0;
if( lphc || message == WM_NCCREATE )
switch(message)
{
@ -2219,27 +2218,6 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
DefWindowProcA(hwnd, message, wParam, lParam);
}
/***********************************************************************
* ComboWndProcA
*
* This is just a wrapper for the real ComboWndProc which locks/unlocks
* window structs.
*/
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
if (!IsWindow(hwnd)) return 0;
return wow_handlers.combo_proc( hwnd, message, wParam, lParam, FALSE );
}
/***********************************************************************
* ComboWndProcW
*/
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
if (!IsWindow(hwnd)) return 0;
return wow_handlers.combo_proc( hwnd, message, wParam, lParam, TRUE );
}
/*************************************************************************
* GetComboBoxInfo (USER32.@)
*/

View File

@ -34,6 +34,7 @@
enum builtin_winprocs
{
WINPROC_BUTTON = 0,
WINPROC_COMBO,
NB_BUILTIN_WINPROCS
};

View File

@ -53,10 +53,13 @@ WNDPROC EDIT_winproc_handle = 0;
static LRESULT WINAPI ButtonWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static LRESULT WINAPI ButtonWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static WINDOWPROC winproc_array[MAX_WINPROCS] =
{
{ ButtonWndProcA, ButtonWndProcW }, /* WINPROC_BUTTON */
{ ComboWndProcA, ComboWndProcW }, /* WINPROC_COMBO */
};
static UINT builtin_used = NB_BUILTIN_WINPROCS;
@ -1052,6 +1055,16 @@ static LRESULT WINAPI ButtonWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return wow_handlers.button_proc( hwnd, msg, wParam, lParam, TRUE );
}
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
return wow_handlers.combo_proc( hwnd, message, wParam, lParam, FALSE );
}
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
return wow_handlers.combo_proc( hwnd, message, wParam, lParam, TRUE );
}
/**********************************************************************
* UserRegisterWowHandlers (USER32.@)