don't erase background in wxControl neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,10 +52,6 @@
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxControl, wxWindow)
|
||||
EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
// wxControl implementation
|
||||
// ============================================================================
|
||||
@@ -326,31 +322,6 @@ bool wxControl::MSWOnNotify(int idCtrl,
|
||||
}
|
||||
#endif // Win95
|
||||
|
||||
void wxControl::OnEraseBackground(wxEraseEvent& event)
|
||||
{
|
||||
// notice that this 'dumb' implementation may cause flicker for some of the
|
||||
// controls in which case they should intercept wxEraseEvent and process it
|
||||
// themselves somehow
|
||||
|
||||
RECT rect;
|
||||
::GetClientRect(GetHwnd(), &rect);
|
||||
|
||||
HBRUSH hBrush = ::CreateSolidBrush(wxColourToRGB(GetBackgroundColour()));
|
||||
|
||||
HDC hdc = GetHdcOf((*event.GetDC()));
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
int mode = ::SetMapMode(hdc, MM_TEXT);
|
||||
#endif
|
||||
|
||||
::FillRect(hdc, &rect, hBrush);
|
||||
::DeleteObject(hBrush);
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
::SetMapMode(hdc, mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||
#if wxUSE_CTL3D
|
||||
WXUINT message,
|
||||
|
Reference in New Issue
Block a user