X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5483756fdc19527ab27e5237c680c3025cb7065d..f87584b55268e165f15de6f8ae34c99df72e5896:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 80f2fc7030..e92244917a 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -18,30 +18,30 @@ #if wxUSE_NOTEBOOK -// wxWidgets +#include "wx/notebook.h" + #ifndef WX_PRECOMP - #include "wx/string.h" - #include "wx/dc.h" + #include "wx/string.h" + #include "wx/dc.h" + #include "wx/log.h" + #include "wx/event.h" + #include "wx/app.h" + #include "wx/dcclient.h" + #include "wx/dcmemory.h" + #include "wx/control.h" #endif // WX_PRECOMP -#include "wx/log.h" #include "wx/imaglist.h" -#include "wx/event.h" -#include "wx/control.h" -#include "wx/notebook.h" -#include "wx/app.h" #include "wx/sysopt.h" -#include "wx/dcclient.h" -#include "wx/dcmemory.h" #include "wx/msw/private.h" #include - -#include - #include "wx/msw/winundef.h" +// include "properly" +#include "wx/msw/wrapcctl.h" + #if wxUSE_UXTHEME #include "wx/msw/uxtheme.h" #endif @@ -274,8 +274,10 @@ bool wxNotebook::Create(wxWindow *parent, if (style & wxNB_FLAT) style |= wxBORDER_SUNKEN; #endif + if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + style |= wxBK_TOP; -#if !wxUSE_UXTHEME +#if !wxUSE_UXTHEME // ComCtl32 notebook tabs simply don't work unless they're on top if we have uxtheme, we can // work around it later (after control creation), but if we don't have uxtheme, we have to clear // those styles @@ -345,14 +347,14 @@ bool wxNotebook::Create(wxWindow *parent, // create backing store UpdateBgBrush(); } - + // comctl32.dll 6.0 doesn't support non-top tabs with visual styles (the // control is simply not rendered correctly), so we disable themes // if possible, otherwise we simply clear the styles. // It's probably not possible to have UXTHEME without ComCtl32 6 or better, but lets // check it anyway. const int verComCtl32 = wxApp::GetComCtl32Version(); - if ( verComCtl32 == 600 ) + if ( verComCtl32 == 600 ) { // check if we use themes at all -- if we don't, we're still okay if ( wxUxThemeEngine::GetIfActive() && (style & (wxBK_BOTTOM|wxBK_LEFT|wxBK_RIGHT))) @@ -861,7 +863,7 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event)) HBRUSH hbr = (HBRUSH)m_hbrBackground; #else HBRUSH hbr = 0; -#endif +#endif wxBrush brush; if ( !hbr ) {