X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bb180f90578884fc6636285bcaa7ddeb453c2293..d7b995a4975f8d79a83029110edd8630751d55ae:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index eef37234b2..f8896e0cc1 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -243,18 +243,18 @@ bool wxNotebook::Create(wxWindow *parent, long style, const wxString& name) { - // Does ComCtl32 support non-top tabs? - int verComCtl32 = wxApp::GetComCtl32Version(); - if ( verComCtl32 < 470 || verComCtl32 >= 600 ) + // comctl32.dll 6.0 doesn't support non-top tabs with visual styles (the + // control is simply not rendered correctly), so disable them in this case + const int verComCtl32 = wxApp::GetComCtl32Version(); + if ( verComCtl32 == 600 ) { - if (style & wxNB_BOTTOM) - style &= ~wxNB_BOTTOM; - - if (style & wxNB_LEFT) - style &= ~wxNB_LEFT; - - if (style & wxNB_RIGHT) - style &= ~wxNB_RIGHT; + // check if we use themes at all -- if we don't, we're still ok +#if wxUSE_UXTHEME + if ( wxUxThemeEngine::GetIfActive() ) +#endif + { + style &= ~(wxNB_BOTTOM | wxNB_LEFT | wxNB_RIGHT); + } } if ( !CreateControl(parent, id, pos, size, style | wxTAB_TRAVERSAL,