+ SetBackgroundColour(parent->GetBackgroundColour()) ;
+ SetForegroundColour(parent->GetForegroundColour()) ;
+
+ 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;
+
+// TODO:
+/*
+ long msStyle = BS_GROUPBOX | WS_CHILD | WS_VISIBLE ; // GROUP_FLAGS;
+
+ bool want3D;
+ WXDWORD exStyle = Determine3DEffects(0, &want3D) ;
+
+ HWND wx_button =
+ CreateWindowEx(exStyle, wxT("BUTTON"), (const wxChar *)label, msStyle,
+ 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
+ wxGetInstance(), NULL);
+#if wxUSE_CTL3D
+ if (want3D)
+ {
+ Ctl3dSubclassCtl(wx_button);
+ m_useCtl3D = TRUE;
+ }
+#endif
+
+ m_hWnd = (WXHWND)wx_button;
+
+ // Subclass again for purposes of dialog editing mode
+ SubclassWin(GetHWND());
+
+ SetFont(parent->GetFont());
+
+ SetSize(x, y, width, height);
+ ShowWindow(wx_button, SW_SHOW);
+*/
+ return FALSE;
+}
+
+wxSize wxStaticBox::DoGetBestSize()
+{
+ int cx, cy;
+ wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+
+ int wBox;
+ GetTextExtent(wxGetWindowText(m_hWnd), &wBox, &cy);
+
+ wBox += 3*cx;
+ int hBox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
+
+ return wxSize(wBox, hBox);
+}
+
+WXHBRUSH wxStaticBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
+ WXUINT message,
+ WXWPARAM wParam,
+ WXLPARAM lParam)
+{
+ // TODO:
+/*
+ if (GetParent()->GetTransparentBackground())
+ SetBkMode((HDC) pDC, TRANSPARENT);
+ else
+ SetBkMode((HDC) pDC, OPAQUE);
+
+ ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue()));
+ ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue()));