don't disable non top tabs if visual themes are not used

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-11-24 21:54:00 +00:00
parent 41bd216844
commit df10208f26
2 changed files with 17 additions and 18 deletions

View File

@@ -24,14 +24,17 @@ managed by wxNotebook.
\twocolwidtha{5cm} \twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt \begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxNB\_LEFT}}{Place tabs on the left side. Not supported under Windows XP.} \twocolitem{\windowstyle{wxNB\_LEFT}}{Place tabs on the left side.}
\twocolitem{\windowstyle{wxNB\_RIGHT}}{Place tabs on the right side. Not supported under Windows XP.} \twocolitem{\windowstyle{wxNB\_RIGHT}}{Place tabs on the right side.}
\twocolitem{\windowstyle{wxNB\_BOTTOM}}{Place tabs under instead of above the notebook pages. Not supported under Windows XP.} \twocolitem{\windowstyle{wxNB\_BOTTOM}}{Place tabs under instead of above the notebook pages.}
\twocolitem{\windowstyle{wxNB\_FIXEDWIDTH}}{(Windows only) All tabs will have same width.} \twocolitem{\windowstyle{wxNB\_FIXEDWIDTH}}{(Windows only) All tabs will have same width.}
\twocolitem{\windowstyle{wxNB\_MULTILINE}}{(Windows only) There can be several rows of tabs.} \twocolitem{\windowstyle{wxNB\_MULTILINE}}{(Windows only) There can be several rows of tabs.}
\end{twocollist} \end{twocollist}
The styles \texttt{wxNB\_LEFT}, \texttt{RIGHT} and \texttt{BOTTOM} are not
supported under Microsoft Windows XP when using visual themes.
See also \helpref{window styles overview}{windowstyles}. See also \helpref{window styles overview}{windowstyles}.
\input noteevt.inc \input noteevt.inc

View File

@@ -33,7 +33,6 @@
#include "wx/event.h" #include "wx/event.h"
#include "wx/control.h" #include "wx/control.h"
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/sysopt.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
@@ -244,21 +243,18 @@ bool wxNotebook::Create(wxWindow *parent,
long style, long style,
const wxString& name) const wxString& name)
{ {
// some versions of comctl32.dll 6.0 included with Windows XP don't // comctl32.dll 6.0 doesn't support non-top tabs with visual styles (the
// support non-top tabs (the control is simply not rendered correctly) but // control is simply not rendered correctly), so disable them in this case
// we can't detect which ones, so be pessimistic by default and disable non const int verComCtl32 = wxApp::GetComCtl32Version();
// top tabs under XP but allow the user to override this by using a special if ( verComCtl32 == 600 )
// system option
bool nonTopTabsOk = wxSystemOptions::GetOptionInt(_T("msw.xp-tab-ok")) != 0;
if ( !nonTopTabsOk )
{ {
int verComCtl32 = wxApp::GetComCtl32Version(); // check if we use themes at all -- if we don't, we're still ok
nonTopTabsOk = verComCtl32 < 470 || verComCtl32 >= 600; #if wxUSE_UXTHEME
} if ( wxUxThemeEngine::GetIfActive() )
#endif
if ( !nonTopTabsOk ) {
{ style &= ~(wxNB_BOTTOM | wxNB_LEFT | wxNB_RIGHT);
style &= ~(wxNB_BOTTOM | wxNB_LEFT | wxNB_RIGHT); }
} }
if ( !CreateControl(parent, id, pos, size, style | wxTAB_TRAVERSAL, if ( !CreateControl(parent, id, pos, size, style | wxTAB_TRAVERSAL,