X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8d772832a04a3d2380ac6b3ffea6bfe6a72dcff6..0b7e6e7da208b6a95fb23cb50286a09dc90d96d2:/src/msw/control.cpp diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 0a177e8d69..ce7b2fca18 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -30,8 +30,8 @@ #include "wx/msw/private.h" -#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS) -#include +#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) + #include #endif IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) @@ -60,9 +60,7 @@ wxControl::~wxControl() bool wxControl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, -#if wxUSE_VALIDATORS const wxValidator& validator, -#endif const wxString& name) { bool rval = wxWindow::Create(parent, id, pos, size, style, name); @@ -206,10 +204,9 @@ bool wxControl::MSWOnNotify(int idCtrl, 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);