after latest changes background of radio buttons _not_ inside the notebook wasn't redrawn at all, fixed this

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-04-11 14:41:36 +00:00
parent ed9c472e11
commit 1a784dfc80
4 changed files with 57 additions and 27 deletions

View File

@@ -2319,30 +2319,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
break;
case WM_PRINTCLIENT:
// we receive this message when DrawThemeParentBackground() is
// called from def window proc of several controls under XP and we
// must draw properly themed background here
//
// note that naively I'd expect filling the client rect with the
// brush returned by MSWGetBgBrush() work -- but for some reason it
// doesn't and we have to call parents MSWPrintChild() which is
// supposed to call DrawThemeBackground() with appropriate params
//
// also note that in this case lParam == PRF_CLIENT but we're
// clearly expected to paint the background and nothing else!
{
for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
{
if ( win->MSWPrintChild((WXHDC)wParam, (wxWindow *)this) )
{
processed = true;
break;
}
if ( win->IsTopLevel() || win->InheritsBackgroundColour() )
break;
}
}
processed = HandlePrintClient((WXHDC)wParam);
break;
case WM_PAINT:
@@ -3715,7 +3692,7 @@ bool wxWindowMSW::HandleDisplayChange()
#ifndef __WXMICROWIN__
bool wxWindowMSW::HandleCtlColor(WXHBRUSH *brush, WXHDC pDC, WXHWND hWnd)
bool wxWindowMSW::HandleCtlColor(WXHBRUSH *brush, WXHDC hDC, WXHWND hWnd)
{
#if !wxUSE_CONTROLS || defined(__WXUNIVERSAL__)
wxUnusedVar(pDC);
@@ -3724,7 +3701,7 @@ bool wxWindowMSW::HandleCtlColor(WXHBRUSH *brush, WXHDC pDC, WXHWND hWnd)
wxControl *item = wxDynamicCast(FindItemByHWND(hWnd, true), wxControl);
if ( item )
*brush = item->MSWControlColor(pDC, hWnd);
*brush = item->MSWControlColor(hDC, hWnd);
else
#endif // wxUSE_CONTROLS
*brush = NULL;
@@ -4062,6 +4039,31 @@ WXHBRUSH wxWindowMSW::MSWGetBgBrush(WXHDC hDC, WXHWND hWndToPaint)
return 0;
}
bool wxWindowMSW::HandlePrintClient(WXHDC hDC)
{
// we receive this message when DrawThemeParentBackground() is
// called from def window proc of several controls under XP and we
// must draw properly themed background here
//
// note that naively I'd expect filling the client rect with the
// brush returned by MSWGetBgBrush() work -- but for some reason it
// doesn't and we have to call parents MSWPrintChild() which is
// supposed to call DrawThemeBackground() with appropriate params
//
// also note that in this case lParam == PRF_CLIENT but we're
// clearly expected to paint the background and nothing else!
for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
{
if ( win->MSWPrintChild(hDC, (wxWindow *)this) )
return true;
if ( win->IsTopLevel() || win->InheritsBackgroundColour() )
break;
}
return false;
}
// ---------------------------------------------------------------------------
// moving and resizing
// ---------------------------------------------------------------------------