m_isBeingDeleted = TRUE;
}
+
+bool wxControl::Create(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size, long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ bool rval = wxWindow::Create(parent, id, pos, size, style, name);
+ if (rval) {
+#if wxUSE_VALIDATORS
+ SetValidator(validator);
+#endif
+ }
+ return rval;
+}
+
bool wxControl::MSWCreateControl(const wxChar *classname,
WXDWORD style,
const wxPoint& pos,
void wxControl::OnEraseBackground(wxEraseEvent& event)
{
- // In general, you don't want to erase the background of a control,
- // or you'll get a flicker.
- // TODO: move this 'null' function into each control that
- // might flicker.
+ // 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);