user32: Pre-allocate the window procedure for the static class.
This commit is contained in:
parent
1e43d19753
commit
80a09a7899
|
@ -38,6 +38,7 @@ enum builtin_winprocs
|
|||
WINPROC_EDIT,
|
||||
WINPROC_LISTBOX,
|
||||
WINPROC_SCROLLBAR,
|
||||
WINPROC_STATIC,
|
||||
NB_BUILTIN_WINPROCS
|
||||
};
|
||||
|
||||
|
|
|
@ -60,8 +60,6 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style );
|
|||
static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
static LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
static COLORREF color_3dshadow, color_3ddkshadow, color_3dhighlight;
|
||||
|
||||
|
@ -104,8 +102,8 @@ const struct builtin_class_descr STATIC_builtin_class =
|
|||
{
|
||||
staticW, /* name */
|
||||
CS_DBLCLKS | CS_PARENTDC, /* style */
|
||||
StaticWndProcA, /* procA */
|
||||
StaticWndProcW, /* procW */
|
||||
NULL, /* procA */
|
||||
BUILTIN_WINPROC(WINPROC_STATIC), /* procW */
|
||||
STATIC_EXTRA_BYTES, /* extra */
|
||||
IDC_ARROW, /* cursor */
|
||||
0 /* brush */
|
||||
|
@ -405,6 +403,8 @@ LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
LONG full_style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||
LONG style = full_style & SS_TYPEMASK;
|
||||
|
||||
if (!IsWindow( hwnd )) return 0;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
|
@ -604,24 +604,6 @@ LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
return lResult;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* StaticWndProcA
|
||||
*/
|
||||
static LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if (!IsWindow( hWnd )) return 0;
|
||||
return wow_handlers.static_proc(hWnd, uMsg, wParam, lParam, FALSE);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* StaticWndProcW
|
||||
*/
|
||||
static LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if (!IsWindow( hWnd )) return 0;
|
||||
return wow_handlers.static_proc(hWnd, uMsg, wParam, lParam, TRUE);
|
||||
}
|
||||
|
||||
static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
{
|
||||
DRAWITEMSTRUCT dis;
|
||||
|
|
|
@ -59,6 +59,8 @@ static LRESULT WINAPI ListBoxWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARA
|
|||
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 LRESULT WINAPI StaticWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
static LRESULT WINAPI StaticWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
static WINDOWPROC winproc_array[MAX_WINPROCS] =
|
||||
{
|
||||
|
@ -67,6 +69,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] =
|
|||
{ EditWndProcA, EditWndProcW }, /* WINPROC_EDIT */
|
||||
{ ListBoxWndProcA, ListBoxWndProcW }, /* WINPROC_LISTBOX */
|
||||
{ ScrollBarWndProcA, ScrollBarWndProcW }, /* WINPROC_SCROLLBAR */
|
||||
{ StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */
|
||||
};
|
||||
|
||||
static UINT builtin_used = NB_BUILTIN_WINPROCS;
|
||||
|
@ -1102,6 +1105,16 @@ static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPA
|
|||
return wow_handlers.scrollbar_proc( hwnd, msg, wParam, lParam, TRUE );
|
||||
}
|
||||
|
||||
static LRESULT WINAPI StaticWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
return wow_handlers.static_proc( hwnd, msg, wParam, lParam, FALSE );
|
||||
}
|
||||
|
||||
static LRESULT WINAPI StaticWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
return wow_handlers.static_proc( hwnd, msg, wParam, lParam, TRUE );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* UserRegisterWowHandlers (USER32.@)
|
||||
|
|
Loading…
Reference in New Issue