mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 08:03:01 +00:00
[User32]
- Fix function ids, setting of the death bit when in NC destroy. - Implement get control brush and color. - Patch by Alexander LAW, Replicate Windows behavior of WM_SETTEXT handler regarding WM_CTLCOLOR* svn path=/trunk/; revision=54259
This commit is contained in:
parent
3c1d785188
commit
c59fc2237c
12 changed files with 132 additions and 83 deletions
|
@ -270,7 +270,7 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
||||||
{
|
{
|
||||||
if (pWnd->fnid != FNID_BUTTON)
|
if (pWnd->fnid != FNID_BUTTON)
|
||||||
{
|
{
|
||||||
ERR("Wrong window class for Button!\n");
|
ERR("Wrong window class for Button! fnId 0x%x\n",pWnd->fnid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,9 +321,9 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
case WM_DESTROY:
|
|
||||||
case WM_NCDESTROY:
|
case WM_NCDESTROY:
|
||||||
NtUserSetWindowFNID(hWnd, FNID_DESTROY);
|
NtUserSetWindowFNID(hWnd, FNID_DESTROY);
|
||||||
|
case WM_DESTROY:
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -442,27 +442,38 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
||||||
case WM_SETTEXT:
|
case WM_SETTEXT:
|
||||||
{
|
{
|
||||||
/* Clear an old text here as Windows does */
|
/* Clear an old text here as Windows does */
|
||||||
HDC hdc = GetDC(hWnd);
|
//
|
||||||
HBRUSH hbrush;
|
// wine Bug: http://bugs.winehq.org/show_bug.cgi?id=25790
|
||||||
RECT client, rc;
|
// Patch: http://source.winehq.org/patches/data/70889
|
||||||
HWND parent = GetParent(hWnd);
|
// By: Alexander LAW, Replicate Windows behavior of WM_SETTEXT handler regarding WM_CTLCOLOR*
|
||||||
|
//
|
||||||
|
if (style & WS_VISIBLE)
|
||||||
|
{
|
||||||
|
HDC hdc = GetDC(hWnd);
|
||||||
|
HBRUSH hbrush;
|
||||||
|
RECT client, rc;
|
||||||
|
HWND parent = GetParent(hWnd);
|
||||||
|
UINT ctlMessage=(btn_type == BS_PUSHBUTTON ||
|
||||||
|
btn_type == BS_DEFPUSHBUTTON ||
|
||||||
|
btn_type == BS_PUSHLIKE ||
|
||||||
|
btn_type == BS_USERBUTTON ||
|
||||||
|
btn_type == BS_OWNERDRAW) ?
|
||||||
|
WM_CTLCOLORBTN : WM_CTLCOLORSTATIC;
|
||||||
|
|
||||||
if (!parent) parent = hWnd;
|
if (!parent) parent = hWnd;
|
||||||
hbrush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC,
|
|
||||||
(WPARAM)hdc, (LPARAM)hWnd);
|
|
||||||
if (!hbrush) /* did the app forget to call DefWindowProc ? */
|
|
||||||
hbrush = (HBRUSH)DefWindowProcW(parent, WM_CTLCOLORSTATIC,
|
|
||||||
(WPARAM)hdc, (LPARAM)hWnd);
|
|
||||||
|
|
||||||
GetClientRect(hWnd, &client);
|
hbrush = GetControlColor( parent, hWnd, hdc, ctlMessage);
|
||||||
rc = client;
|
|
||||||
BUTTON_CalcLabelRect(hWnd, hdc, &rc);
|
|
||||||
/* Clip by client rect bounds */
|
|
||||||
if (rc.right > client.right) rc.right = client.right;
|
|
||||||
if (rc.bottom > client.bottom) rc.bottom = client.bottom;
|
|
||||||
FillRect(hdc, &rc, hbrush);
|
|
||||||
ReleaseDC(hWnd, hdc);
|
|
||||||
|
|
||||||
|
GetClientRect(hWnd, &client);
|
||||||
|
rc = client;
|
||||||
|
BUTTON_CalcLabelRect(hWnd, hdc, &rc);
|
||||||
|
/* Clip by client rect bounds */
|
||||||
|
if (rc.right > client.right) rc.right = client.right;
|
||||||
|
if (rc.bottom > client.bottom) rc.bottom = client.bottom;
|
||||||
|
FillRect(hdc, &rc, hbrush);
|
||||||
|
ReleaseDC(hWnd, hdc);
|
||||||
|
}
|
||||||
|
////
|
||||||
if (unicode) DefWindowProcW( hWnd, WM_SETTEXT, wParam, lParam );
|
if (unicode) DefWindowProcW( hWnd, WM_SETTEXT, wParam, lParam );
|
||||||
else DefWindowProcA( hWnd, WM_SETTEXT, wParam, lParam );
|
else DefWindowProcA( hWnd, WM_SETTEXT, wParam, lParam );
|
||||||
if (btn_type == BS_GROUPBOX) /* Yes, only for BS_GROUPBOX */
|
if (btn_type == BS_GROUPBOX) /* Yes, only for BS_GROUPBOX */
|
||||||
|
@ -974,11 +985,7 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
|
|
||||||
parent = GetParent(hwnd);
|
parent = GetParent(hwnd);
|
||||||
if (!parent) parent = hwnd;
|
if (!parent) parent = hwnd;
|
||||||
hBrush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC,
|
hBrush = GetControlColor( parent, hwnd, hDC, WM_CTLCOLORSTATIC);
|
||||||
(WPARAM)hDC, (LPARAM)hwnd);
|
|
||||||
if (!hBrush) /* did the app forget to call defwindowproc ? */
|
|
||||||
hBrush = (HBRUSH)DefWindowProcW(parent, WM_CTLCOLORSTATIC,
|
|
||||||
(WPARAM)hDC, (LPARAM)hwnd );
|
|
||||||
setup_clipping( hwnd, hDC );
|
setup_clipping( hwnd, hDC );
|
||||||
|
|
||||||
if (style & BS_LEFTTEXT)
|
if (style & BS_LEFTTEXT)
|
||||||
|
@ -1118,10 +1125,7 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
/* GroupBox acts like static control, so it sends CTLCOLORSTATIC */
|
/* GroupBox acts like static control, so it sends CTLCOLORSTATIC */
|
||||||
parent = GetParent(hwnd);
|
parent = GetParent(hwnd);
|
||||||
if (!parent) parent = hwnd;
|
if (!parent) parent = hwnd;
|
||||||
hbr = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC, (WPARAM)hDC, (LPARAM)hwnd);
|
hbr = GetControlColor( parent, hwnd, hDC, WM_CTLCOLORSTATIC);
|
||||||
if (!hbr) /* did the app forget to call defwindowproc ? */
|
|
||||||
hbr = (HBRUSH)DefWindowProcW(parent, WM_CTLCOLORSTATIC,
|
|
||||||
(WPARAM)hDC, (LPARAM)hwnd);
|
|
||||||
setup_clipping( hwnd, hDC );
|
setup_clipping( hwnd, hDC );
|
||||||
|
|
||||||
GetClientRect( hwnd, &rc);
|
GetClientRect( hwnd, &rc);
|
||||||
|
|
|
@ -867,9 +867,7 @@ static HBRUSH COMBO_PrepareColors(
|
||||||
*/
|
*/
|
||||||
if (CB_DISABLED(lphc))
|
if (CB_DISABLED(lphc))
|
||||||
{
|
{
|
||||||
hBkgBrush = (HBRUSH)SendMessageW(lphc->owner, WM_CTLCOLORSTATIC,
|
hBkgBrush = GetControlColor(lphc->owner, lphc->self, hDC, WM_CTLCOLORSTATIC);
|
||||||
(WPARAM)hDC, (LPARAM)lphc->self );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We have to change the text color since WM_CTLCOLORSTATIC will
|
* We have to change the text color since WM_CTLCOLORSTATIC will
|
||||||
* set it to the "enabled" color. This is the same behavior as the
|
* set it to the "enabled" color. This is the same behavior as the
|
||||||
|
@ -880,8 +878,7 @@ static HBRUSH COMBO_PrepareColors(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* FIXME: In which cases WM_CTLCOLORLISTBOX should be sent? */
|
/* FIXME: In which cases WM_CTLCOLORLISTBOX should be sent? */
|
||||||
hBkgBrush = (HBRUSH)SendMessageW(lphc->owner, WM_CTLCOLOREDIT,
|
hBkgBrush = GetControlColor(lphc->owner, lphc->self, hDC, WM_CTLCOLOREDIT);
|
||||||
(WPARAM)hDC, (LPARAM)lphc->self );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1847,7 +1844,7 @@ LRESULT WINAPI ComboWndProc_common( HWND hwnd, UINT message,
|
||||||
{
|
{
|
||||||
if (pWnd->fnid != FNID_COMBOBOX)
|
if (pWnd->fnid != FNID_COMBOBOX)
|
||||||
{
|
{
|
||||||
ERR("Wrong window class for ComboBox!\n");
|
ERR("Wrong window class for ComboBox! fnId 0x%x\n",pWnd->fnid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,9 +228,7 @@ static HBRUSH EDIT_NotifyCtlColor(EDITSTATE *es, HDC hdc)
|
||||||
msg = WM_CTLCOLOREDIT;
|
msg = WM_CTLCOLOREDIT;
|
||||||
|
|
||||||
/* why do we notify to es->hwndParent, and we send this one to GetParent()? */
|
/* why do we notify to es->hwndParent, and we send this one to GetParent()? */
|
||||||
hbrush = (HBRUSH)SendMessageW(GetParent(es->hwndSelf), msg, (WPARAM)hdc, (LPARAM)es->hwndSelf);
|
hbrush = GetControlBrush(es->hwndSelf, hdc, msg);
|
||||||
if (!hbrush)
|
|
||||||
hbrush = (HBRUSH)DefWindowProcW(GetParent(es->hwndSelf), msg, (WPARAM)hdc, (LPARAM)es->hwndSelf);
|
|
||||||
return hbrush;
|
return hbrush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4481,7 +4479,7 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
{
|
{
|
||||||
if (pWnd->fnid != FNID_EDIT)
|
if (pWnd->fnid != FNID_EDIT)
|
||||||
{
|
{
|
||||||
ERR("Wrong window class for Edit!\n");
|
ERR("Wrong window class for Edit! fnId 0x%x\n",pWnd->fnid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,8 +224,9 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
|
||||||
}
|
}
|
||||||
return (hIconTitleFont ? 0 : -1);
|
return (hIconTitleFont ? 0 : -1);
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
case WM_DESTROY:
|
case WM_NCDESTROY:
|
||||||
NtUserSetWindowFNID(hWnd, FNID_DESTROY);
|
NtUserSetWindowFNID(hWnd, FNID_DESTROY);
|
||||||
|
case WM_DESTROY:
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case WM_NCHITTEST:
|
case WM_NCHITTEST:
|
||||||
|
|
|
@ -2588,7 +2588,7 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
|
||||||
{
|
{
|
||||||
if (pWnd->fnid != FNID_LISTBOX)
|
if (pWnd->fnid != FNID_LISTBOX)
|
||||||
{
|
{
|
||||||
ERR("Wrong window class for listbox!\n");
|
ERR("Wrong window class for listbox! fnId 0x%x\n",pWnd->fnid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3008,9 +3008,6 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
#ifdef __REACTOS__
|
|
||||||
NtUserSetWindowFNID(hwnd, FNID_DESTROY);
|
|
||||||
#endif
|
|
||||||
return LISTBOX_Destroy( descr );
|
return LISTBOX_Destroy( descr );
|
||||||
|
|
||||||
case WM_ENABLE:
|
case WM_ENABLE:
|
||||||
|
@ -3185,6 +3182,9 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
|
||||||
case WM_NCDESTROY:
|
case WM_NCDESTROY:
|
||||||
if( lphc && (lphc->dwStyle & CBS_DROPDOWNLIST) != CBS_SIMPLE )
|
if( lphc && (lphc->dwStyle & CBS_DROPDOWNLIST) != CBS_SIMPLE )
|
||||||
lphc->hWndLBox = 0;
|
lphc->hWndLBox = 0;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
NtUserSetWindowFNID(hwnd, FNID_DESTROY);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NCACTIVATE:
|
case WM_NCACTIVATE:
|
||||||
|
|
|
@ -1277,8 +1277,11 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
NtUserSetWindowFNID(Wnd, FNID_DESTROY);
|
|
||||||
return DefWindowProc(Wnd, Msg, wParam, lParam );
|
return DefWindowProc(Wnd, Msg, wParam, lParam );
|
||||||
|
|
||||||
|
case WM_NCDESTROY:
|
||||||
|
NtUserSetWindowFNID(Wnd, FNID_DESTROY);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#if 0 /* FIXME */
|
//#if 0 /* FIXME */
|
||||||
|
|
|
@ -324,33 +324,9 @@ static VOID STATIC_TryPaintFcn(HWND hwnd, LONG full_style)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI GdiValidateHandle(HGDIOBJ hobj);
|
|
||||||
|
|
||||||
static HBRUSH STATIC_SendWmCtlColorStatic(HWND hwnd, HDC hdc)
|
static HBRUSH STATIC_SendWmCtlColorStatic(HWND hwnd, HDC hdc)
|
||||||
{
|
{
|
||||||
PWND pwnd;
|
return GetControlBrush( hwnd, hdc, WM_CTLCOLORSTATIC);
|
||||||
HBRUSH hBrush;
|
|
||||||
HWND parent = GetParent(hwnd);
|
|
||||||
|
|
||||||
if (!parent) parent = hwnd;
|
|
||||||
// ReactOS
|
|
||||||
pwnd = ValidateHwnd(parent);
|
|
||||||
if (pwnd && !TestWindowProcess(pwnd))
|
|
||||||
{
|
|
||||||
return (HBRUSH)DefWindowProcW( parent, WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd);
|
|
||||||
}
|
|
||||||
////
|
|
||||||
hBrush = (HBRUSH) SendMessageW( parent,
|
|
||||||
WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
|
|
||||||
if (!hBrush || /* did the app forget to call DefWindowProc ? */
|
|
||||||
!GdiValidateHandle(hBrush)) // ReactOS
|
|
||||||
{
|
|
||||||
/* FIXME: DefWindowProc should return different colors if a
|
|
||||||
manifest is present */
|
|
||||||
hBrush = (HBRUSH)DefWindowProcW( parent, WM_CTLCOLORSTATIC,
|
|
||||||
(WPARAM)hdc, (LPARAM)hwnd);
|
|
||||||
}
|
|
||||||
return hBrush;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID STATIC_InitColours(void)
|
static VOID STATIC_InitColours(void)
|
||||||
|
@ -403,7 +379,7 @@ LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
{
|
{
|
||||||
if (pWnd->fnid != FNID_STATIC)
|
if (pWnd->fnid != FNID_STATIC)
|
||||||
{
|
{
|
||||||
ERR("Wrong window class for Static!\n");
|
ERR("Wrong window class for Static! fnId 0x%x\n",pWnd->fnid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -642,6 +618,7 @@ LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
|
static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
|
||||||
{
|
{
|
||||||
DRAWITEMSTRUCT dis;
|
DRAWITEMSTRUCT dis;
|
||||||
|
HBRUSH hBrush;
|
||||||
HFONT font, oldFont = NULL;
|
HFONT font, oldFont = NULL;
|
||||||
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
|
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
|
||||||
|
|
||||||
|
@ -657,7 +634,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
|
||||||
|
|
||||||
font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
||||||
if (font) oldFont = SelectObject( hdc, font );
|
if (font) oldFont = SelectObject( hdc, font );
|
||||||
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
|
hBrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||||
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
|
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
|
||||||
if (font) SelectObject( hdc, oldFont );
|
if (font) SelectObject( hdc, oldFont );
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,5 +99,8 @@ void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
||||||
BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down );
|
BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down );
|
||||||
HWND* WIN_ListChildren (HWND hWndparent);
|
HWND* WIN_ListChildren (HWND hWndparent);
|
||||||
VOID DeleteFrameBrushes(VOID);
|
VOID DeleteFrameBrushes(VOID);
|
||||||
|
BOOL WINAPI GdiValidateHandle(HGDIOBJ);
|
||||||
|
HBRUSH FASTCALL GetControlColor(HWND,HWND,HDC,UINT);
|
||||||
|
HBRUSH FASTCALL GetControlBrush(HWND,HDC,UINT);
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -481,6 +481,45 @@ ValidateHwndOrDesk(HWND hwnd)
|
||||||
return ValidateHwnd(hwnd);
|
return ValidateHwnd(hwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HBRUSH
|
||||||
|
FASTCALL
|
||||||
|
GetControlColor(
|
||||||
|
HWND hwndParent,
|
||||||
|
HWND hwnd,
|
||||||
|
HDC hdc,
|
||||||
|
UINT CtlMsg)
|
||||||
|
{
|
||||||
|
PWND pwnd;
|
||||||
|
HBRUSH hBrush;
|
||||||
|
|
||||||
|
if (!hwndParent) hwndParent = hwnd;
|
||||||
|
|
||||||
|
pwnd = ValidateHwnd(hwndParent);
|
||||||
|
if (pwnd && !TestWindowProcess(pwnd))
|
||||||
|
{
|
||||||
|
return (HBRUSH)DefWindowProcW( hwndParent, CtlMsg, (WPARAM)hdc, (LPARAM)hwnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
hBrush = (HBRUSH)SendMessageW( hwndParent, CtlMsg, (WPARAM)hdc, (LPARAM)hwnd);
|
||||||
|
|
||||||
|
if (!hBrush || !GdiValidateHandle(hBrush))
|
||||||
|
{
|
||||||
|
hBrush = (HBRUSH)DefWindowProcW( hwndParent, CtlMsg, (WPARAM)hdc, (LPARAM)hwnd);
|
||||||
|
}
|
||||||
|
return hBrush;
|
||||||
|
}
|
||||||
|
|
||||||
|
HBRUSH
|
||||||
|
FASTCALL
|
||||||
|
GetControlBrush(
|
||||||
|
HWND hwnd,
|
||||||
|
HDC hdc,
|
||||||
|
UINT ctlType)
|
||||||
|
{
|
||||||
|
HWND hwndParent = GetParent(hwnd);
|
||||||
|
return GetControlColor( hwndParent, hwnd, hdc, ctlType);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1901,6 +1901,15 @@ RealDefWindowProcA(HWND hWnd,
|
||||||
LRESULT Result = 0;
|
LRESULT Result = 0;
|
||||||
PWND Wnd;
|
PWND Wnd;
|
||||||
|
|
||||||
|
Wnd = ValidateHwnd(hWnd);
|
||||||
|
|
||||||
|
if ( !Wnd &&
|
||||||
|
Msg != WM_CTLCOLORMSGBOX &&
|
||||||
|
Msg != WM_CTLCOLORBTN &&
|
||||||
|
Msg != WM_CTLCOLORDLG &&
|
||||||
|
Msg != WM_CTLCOLORSTATIC )
|
||||||
|
return 0;
|
||||||
|
|
||||||
SPY_EnterMessage(SPY_DEFWNDPROC, hWnd, Msg, wParam, lParam);
|
SPY_EnterMessage(SPY_DEFWNDPROC, hWnd, Msg, wParam, lParam);
|
||||||
switch (Msg)
|
switch (Msg)
|
||||||
{
|
{
|
||||||
|
@ -1925,7 +1934,6 @@ RealDefWindowProcA(HWND hWnd,
|
||||||
PWSTR buf;
|
PWSTR buf;
|
||||||
ULONG len;
|
ULONG len;
|
||||||
|
|
||||||
Wnd = ValidateHwnd(hWnd);
|
|
||||||
if (Wnd != NULL && Wnd->strName.Length != 0)
|
if (Wnd != NULL && Wnd->strName.Length != 0)
|
||||||
{
|
{
|
||||||
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||||
|
@ -1948,7 +1956,6 @@ RealDefWindowProcA(HWND hWnd,
|
||||||
PSTR outbuf = (PSTR)lParam;
|
PSTR outbuf = (PSTR)lParam;
|
||||||
UINT copy;
|
UINT copy;
|
||||||
|
|
||||||
Wnd = ValidateHwnd(hWnd);
|
|
||||||
if (Wnd != NULL && wParam != 0)
|
if (Wnd != NULL && wParam != 0)
|
||||||
{
|
{
|
||||||
if (Wnd->strName.Buffer != NULL)
|
if (Wnd->strName.Buffer != NULL)
|
||||||
|
@ -2061,6 +2068,15 @@ RealDefWindowProcW(HWND hWnd,
|
||||||
LRESULT Result = 0;
|
LRESULT Result = 0;
|
||||||
PWND Wnd;
|
PWND Wnd;
|
||||||
|
|
||||||
|
Wnd = ValidateHwnd(hWnd);
|
||||||
|
|
||||||
|
if ( !Wnd &&
|
||||||
|
Msg != WM_CTLCOLORMSGBOX &&
|
||||||
|
Msg != WM_CTLCOLORBTN &&
|
||||||
|
Msg != WM_CTLCOLORDLG &&
|
||||||
|
Msg != WM_CTLCOLORSTATIC )
|
||||||
|
return 0;
|
||||||
|
|
||||||
SPY_EnterMessage(SPY_DEFWNDPROC, hWnd, Msg, wParam, lParam);
|
SPY_EnterMessage(SPY_DEFWNDPROC, hWnd, Msg, wParam, lParam);
|
||||||
switch (Msg)
|
switch (Msg)
|
||||||
{
|
{
|
||||||
|
@ -2085,7 +2101,6 @@ RealDefWindowProcW(HWND hWnd,
|
||||||
PWSTR buf;
|
PWSTR buf;
|
||||||
ULONG len;
|
ULONG len;
|
||||||
|
|
||||||
Wnd = ValidateHwnd(hWnd);
|
|
||||||
if (Wnd != NULL && Wnd->strName.Length != 0)
|
if (Wnd != NULL && Wnd->strName.Length != 0)
|
||||||
{
|
{
|
||||||
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
buf = DesktopPtrToUser(Wnd->strName.Buffer);
|
||||||
|
@ -2107,7 +2122,6 @@ RealDefWindowProcW(HWND hWnd,
|
||||||
PWSTR buf = NULL;
|
PWSTR buf = NULL;
|
||||||
PWSTR outbuf = (PWSTR)lParam;
|
PWSTR outbuf = (PWSTR)lParam;
|
||||||
|
|
||||||
Wnd = ValidateHwnd(hWnd);
|
|
||||||
if (Wnd != NULL && wParam != 0)
|
if (Wnd != NULL && wParam != 0)
|
||||||
{
|
{
|
||||||
if (Wnd->strName.Buffer != NULL)
|
if (Wnd->strName.Buffer != NULL)
|
||||||
|
|
|
@ -1161,11 +1161,18 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
HeapFree( GetProcessHeap(), 0, ci );
|
HeapFree( GetProcessHeap(), 0, ci );
|
||||||
SetWindowLongPtrW( hwnd, 0, 0 );
|
SetWindowLongPtrW( hwnd, 0, 0 );
|
||||||
NtUserSetWindowFNID(hwnd, FNID_DESTROY);
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
case WM_NCDESTROY:
|
||||||
|
{
|
||||||
|
NtUserSetWindowFNID(hwnd, FNID_DESTROY);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
case WM_MDIACTIVATE:
|
case WM_MDIACTIVATE:
|
||||||
{
|
{
|
||||||
if( ci->hwndActiveChild != (HWND)wParam )
|
if( ci->hwndActiveChild != (HWND)wParam )
|
||||||
|
|
|
@ -1852,11 +1852,14 @@ LRESULT WINAPI PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM l
|
||||||
top_popup = NULL;
|
top_popup = NULL;
|
||||||
top_popup_hmenu = NULL;
|
top_popup_hmenu = NULL;
|
||||||
}
|
}
|
||||||
#ifdef __REACTOS__
|
|
||||||
NtUserSetWindowFNID(Wnd, FNID_DESTROY);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
case WM_NCDESTROY:
|
||||||
|
NtUserSetWindowFNID(Wnd, FNID_DESTROY);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case WM_SHOWWINDOW:
|
case WM_SHOWWINDOW:
|
||||||
if (0 != wParam)
|
if (0 != wParam)
|
||||||
{
|
{
|
||||||
|
@ -1949,11 +1952,14 @@ PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
||||||
top_popup = NULL;
|
top_popup = NULL;
|
||||||
top_popup_hmenu = NULL;
|
top_popup_hmenu = NULL;
|
||||||
}
|
}
|
||||||
#ifdef __REACTOS__
|
|
||||||
NtUserSetWindowFNID(Wnd, FNID_DESTROY);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
case WM_NCDESTROY:
|
||||||
|
NtUserSetWindowFNID(Wnd, FNID_DESTROY);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case WM_SHOWWINDOW:
|
case WM_SHOWWINDOW:
|
||||||
if (0 != wParam)
|
if (0 != wParam)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue