Disable non-standard notebook styles if CommCtl doesn't support them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-06-05 13:35:50 +00:00
parent 34aa61407a
commit 04eb05b01e
2 changed files with 21 additions and 1 deletions

View File

@@ -32,6 +32,7 @@
#include "wx/event.h"
#include "wx/control.h"
#include "wx/notebook.h"
#include "wx/app.h"
#include "wx/msw/private.h"
@@ -156,7 +157,20 @@ bool wxNotebook::Create(wxWindow *parent,
long style,
const wxString& name)
{
// base init
// Does ComCtl32 support non-top tabs?
int verComCtl32 = wxApp::GetComCtl32Version();
if ( verComCtl32 < 470 || verComCtl32 >= 600 )
{
if (style & wxNB_BOTTOM)
style &= ~wxNB_BOTTOM;
if (style & wxNB_LEFT)
style &= ~wxNB_LEFT;
if (style & wxNB_RIGHT)
style &= ~wxNB_RIGHT;
}
if ( !CreateControl(parent, id, pos, size, style | wxTAB_TRAVERSAL,
wxDefaultValidator, name) )
return FALSE;