diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 0eea37a6b5..4231b22c5d 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -141,7 +141,7 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const WXDWORD msflags = wxWindow::MSWGetStyle ( (style & ~wxBORDER_MASK) | wxBORDER_NONE, exflags - ) & ~WS_CHILD; + ) & ~WS_CHILD & ~WS_VISIBLE; // first select the kind of window being created // diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 730d91d274..34f6fcef48 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1161,7 +1161,8 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const // is a more neutral term, we don't necessarily get a sunken effect in // Windows XP. Instead we get the appropriate style for the theme. - if (border == wxBORDER_DEFAULT && wxTheApp->GetAuto3D() && GetParent() && + if (border == wxBORDER_DEFAULT && wxTheApp->GetAuto3D() && + GetParent() && GetParent()->IsKindOf(CLASSINFO(wxPanel)) && ((GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS)) { border = (wxBorder)((flags & wxBORDER_MASK) | wxBORDER_SUNKEN);