Fix wxFULL_REPAINT_ON_RESIZE handling in wxMSW

Fix regression introduced in d4e595adb0
where the wxFULL_REPAINT_ON_RESIZE flag was accidentally ignored in most cases.
This commit is contained in:
Václav Slavík
2017-01-05 19:33:30 +01:00
committed by Václav Slavík
parent 2b342e8777
commit e99abe513a
3 changed files with 6 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ public:
long style = 0, long style = 0,
const wxString& name = wxPanelNameStr) const wxString& name = wxPanelNameStr)
{ {
return CreateUsingMSWClass(GetMSWClassName(), return CreateUsingMSWClass(GetMSWClassName(style),
parent, id, pos, size, style, name); parent, id, pos, size, style, name);
} }
@@ -250,7 +250,7 @@ public:
// object, taking into account wxFULL_REPAINT_ON_RESIZE style (if it's not // object, taking into account wxFULL_REPAINT_ON_RESIZE style (if it's not
// specified, the wxApp::GetNoRedrawClassSuffix()-suffixed version of the // specified, the wxApp::GetNoRedrawClassSuffix()-suffixed version of the
// class is used). // class is used).
const wxChar *GetMSWClassName() const; static const wxChar *GetMSWClassName(long style);
// creates the window of specified Windows class with given style, extended // creates the window of specified Windows class with given style, extended
// style, title and geometry (default values // style, title and geometry (default values

View File

@@ -407,7 +407,7 @@ bool wxTopLevelWindowMSW::CreateFrame(const wxString& title,
if ( wxApp::MSWGetDefaultLayout(m_parent) == wxLayout_RightToLeft ) if ( wxApp::MSWGetDefaultLayout(m_parent) == wxLayout_RightToLeft )
exflags |= WS_EX_LAYOUTRTL; exflags |= WS_EX_LAYOUTRTL;
return MSWCreate(GetMSWClassName(), title.t_str(), pos, sz, flags, exflags); return MSWCreate(GetMSWClassName(GetWindowStyle()), title.t_str(), pos, sz, flags, exflags);
} }
bool wxTopLevelWindowMSW::Create(wxWindow *parent, bool wxTopLevelWindowMSW::Create(wxWindow *parent,

View File

@@ -468,15 +468,15 @@ wxWindowMSW::~wxWindowMSW()
} }
const wxChar *wxWindowMSW::GetMSWClassName() const const wxChar *wxWindowMSW::GetMSWClassName(long style)
{ {
return wxApp::GetRegisteredClassName return wxApp::GetRegisteredClassName
( (
wxT("wxWindow"), wxT("wxWindow"),
COLOR_BTNFACE, COLOR_BTNFACE,
0, // no special extra style 0, // no special extra style
HasFlag(wxFULL_REPAINT_ON_RESIZE) ? wxApp::RegClass_Default (style & wxFULL_REPAINT_ON_RESIZE) ? wxApp::RegClass_Default
: wxApp::RegClass_ReturnNR : wxApp::RegClass_ReturnNR
); );
} }