- // base init
- if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
- return FALSE;
-
- // colors and font
-// TODO: m_backgroundColour = wxColour(GetSysColor(COLOR_BTNFACE));
- m_foregroundColour = *wxBLACK ;
-
- // TODO:
-/*
- // style
- m_windowStyle = style | wxTAB_TRAVERSAL;
-
- long tabStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_TABS;
-
- if (m_windowStyle & wxCLIP_CHILDREN)
- tabStyle |= WS_CLIPCHILDREN;
- if ( m_windowStyle & wxTC_MULTILINE )
- tabStyle |= TCS_MULTILINE;
- if ( m_windowStyle & wxBORDER )
- tabStyle &= WS_BORDER;
- if (m_windowStyle & wxNB_FIXEDWIDTH)
- tabStyle |= TCS_FIXEDWIDTH ;
- if (m_windowStyle & wxNB_BOTTOM)
- tabStyle |= TCS_RIGHT;
- if (m_windowStyle & wxNB_LEFT)
- tabStyle |= TCS_VERTICAL;
- if (m_windowStyle & wxNB_RIGHT)
- tabStyle |= TCS_VERTICAL|TCS_RIGHT;
-
-
- if ( !MSWCreate(GetId(), GetParent(), WC_TABCONTROL,
- this, NULL, pos.x, pos.y, size.x, size.y,
- tabStyle, NULL, 0) )
- {
- return FALSE;
- }
-
- // Not all compilers recognise SetWindowFont
- ::SendMessage(GetHwnd(), WM_SETFONT,
- (WPARAM)::GetStockObject(DEFAULT_GUI_FONT), TRUE);
-
-
- if ( parent != NULL )
- parent->AddChild(this);
-*/
- SubclassWin(m_hWnd);
-
- return FALSE;
-}
-
-// dtor
-wxNotebook::~wxNotebook()
+ if ( (lStyle & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
+ lStyle |= wxBK_TOP;
+ //
+ // Base init
+ //
+ if (!CreateControl( pParent
+ ,vId
+ ,rPos
+ ,rSize
+ ,lStyle
+ ,wxDefaultValidator
+ ,rsName
+ ))
+ return false;
+
+ //
+ // Notebook, so explicitly specify 0 as last parameter
+ //
+ if (!OS2CreateControl( wxT("NOTEBOOK")
+ ,wxEmptyString
+ ,rPos
+ ,rSize
+ ,lStyle | wxTAB_TRAVERSAL
+ ))
+ return false;
+
+ SetBackgroundColour(wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)));
+ return true;
+} // end of wxNotebook::Create
+
+WXDWORD wxNotebook::OS2GetStyle (
+ long lStyle
+, WXDWORD* pdwExstyle
+) const