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:
Vadim Zeitlin
2004-11-18 23:20:10 +00:00
parent 17bcd9a6b5
commit 38c58c778d
2 changed files with 0 additions and 32 deletions

View File

@@ -70,8 +70,6 @@ public:
const wxArrayLong& GetSubcontrols() const { return m_subControls; }
void OnEraseBackground(wxEraseEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
@@ -134,7 +132,6 @@ protected:
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl)
DECLARE_EVENT_TABLE()
};
#endif // _WX_CONTROL_H_

View File

@@ -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,