user32: Pre-allocate the window procedure for the combobox class.
This commit is contained in:
parent
87f83f8618
commit
05cf0ff29f
|
@ -86,9 +86,6 @@ static UINT CBitHeight, CBitWidth;
|
||||||
#define COMBO_EDITBUTTONSPACE() 0
|
#define COMBO_EDITBUTTONSPACE() 0
|
||||||
#define EDIT_CONTROL_PADDING() 1
|
#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
|
* combo class descriptor
|
||||||
*/
|
*/
|
||||||
|
@ -97,8 +94,8 @@ const struct builtin_class_descr COMBO_builtin_class =
|
||||||
{
|
{
|
||||||
comboboxW, /* name */
|
comboboxW, /* name */
|
||||||
CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */
|
CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */
|
||||||
ComboWndProcA, /* procA */
|
NULL, /* procA */
|
||||||
ComboWndProcW, /* procW */
|
BUILTIN_WINPROC(WINPROC_COMBO), /* procW */
|
||||||
sizeof(HEADCOMBO *), /* extra */
|
sizeof(HEADCOMBO *), /* extra */
|
||||||
IDC_ARROW, /* cursor */
|
IDC_ARROW, /* cursor */
|
||||||
0 /* brush */
|
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",
|
TRACE("[%p]: msg %s wp %08lx lp %08lx\n",
|
||||||
hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
|
hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
|
||||||
|
|
||||||
|
if (!IsWindow(hwnd)) return 0;
|
||||||
|
|
||||||
if( lphc || message == WM_NCCREATE )
|
if( lphc || message == WM_NCCREATE )
|
||||||
switch(message)
|
switch(message)
|
||||||
{
|
{
|
||||||
|
@ -2219,27 +2218,6 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
|
||||||
DefWindowProcA(hwnd, message, wParam, lParam);
|
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.@)
|
* GetComboBoxInfo (USER32.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
enum builtin_winprocs
|
enum builtin_winprocs
|
||||||
{
|
{
|
||||||
WINPROC_BUTTON = 0,
|
WINPROC_BUTTON = 0,
|
||||||
|
WINPROC_COMBO,
|
||||||
NB_BUILTIN_WINPROCS
|
NB_BUILTIN_WINPROCS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,13 @@ WNDPROC EDIT_winproc_handle = 0;
|
||||||
|
|
||||||
static LRESULT WINAPI ButtonWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
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 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] =
|
static WINDOWPROC winproc_array[MAX_WINPROCS] =
|
||||||
{
|
{
|
||||||
{ ButtonWndProcA, ButtonWndProcW }, /* WINPROC_BUTTON */
|
{ ButtonWndProcA, ButtonWndProcW }, /* WINPROC_BUTTON */
|
||||||
|
{ ComboWndProcA, ComboWndProcW }, /* WINPROC_COMBO */
|
||||||
};
|
};
|
||||||
|
|
||||||
static UINT builtin_used = NB_BUILTIN_WINPROCS;
|
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 );
|
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.@)
|
* UserRegisterWowHandlers (USER32.@)
|
||||||
|
|
Loading…
Reference in New Issue