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:
@@ -70,8 +70,6 @@ public:
|
|||||||
|
|
||||||
const wxArrayLong& GetSubcontrols() const { return m_subControls; }
|
const wxArrayLong& GetSubcontrols() const { return m_subControls; }
|
||||||
|
|
||||||
void OnEraseBackground(wxEraseEvent& event);
|
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
@@ -134,7 +132,6 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl)
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl)
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WX_CONTROL_H_
|
#endif // _WX_CONTROL_H_
|
||||||
|
@@ -52,10 +52,6 @@
|
|||||||
|
|
||||||
IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
|
IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxControl, wxWindow)
|
|
||||||
EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// wxControl implementation
|
// wxControl implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -326,31 +322,6 @@ bool wxControl::MSWOnNotify(int idCtrl,
|
|||||||
}
|
}
|
||||||
#endif // Win95
|
#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),
|
WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
WXUINT message,
|
WXUINT message,
|
||||||
|
Reference in New Issue
Block a user