+ SetName(name);
+ if (parent) parent->AddChild(this);
+
+ SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
+ SetForegroundColour(parent->GetDefaultForegroundColour()) ;
+
+ if ( id == -1 )
+ m_windowId = (int)NewControlId();
+ else
+ m_windowId = id;
+
+ int x = pos.x;
+ int y = pos.y;
+ int width = size.x;
+ int height = size.y;
+
+ m_windowStyle = style;
+
+ long msStyle = WS_CHILD|WS_VISIBLE;
+ if (m_windowStyle & wxALIGN_CENTRE)
+ msStyle |= SS_CENTER;
+ else if (m_windowStyle & wxALIGN_RIGHT)
+ msStyle |= SS_RIGHT;
+ else
+ msStyle |= SS_LEFT;
+
+ // Even with extended styles, need to combine with WS_BORDER
+ // for them to look right.
+ if ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) ||
+ (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))
+ msStyle |= WS_BORDER;
+
+ HWND static_item = CreateWindowEx(MakeExtendedStyle(m_windowStyle), "STATIC", (const char *)label,
+ msStyle,
+ 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
+ wxGetInstance(), NULL);
+
+#if CTL3D
+/*
+ if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
+ Ctl3dSubclassCtl(static_item);
+*/
+#endif
+
+ m_hWnd = (WXHWND)static_item;
+
+ SubclassWin((WXHWND)static_item);
+
+ SetFont(* parent->GetFont());
+ SetSize(x, y, width, height);
+ return TRUE;
+}