]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
compilation for Win32 using configure works again
[wxWidgets.git] / src / msw / control.cpp
index f6f67bac355088e4230c344921cabd0ce5dffb1e..89ddd5c54680727beeb67932f3b04d3699cf4db4 100644 (file)
@@ -56,6 +56,22 @@ wxControl::~wxControl()
     m_isBeingDeleted = TRUE;
 }
 
     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,
 bool wxControl::MSWCreateControl(const wxChar *classname,
                                  WXDWORD style,
                                  const wxPoint& pos,
@@ -188,10 +204,9 @@ bool wxControl::MSWOnNotify(int idCtrl,
 
 void wxControl::OnEraseBackground(wxEraseEvent& event)
 {
 
 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);
 
     RECT rect;
     ::GetClientRect(GetHwnd(), &rect);