-BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
- EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
-END_EVENT_TABLE()
-
-#endif
-
-/*
- * Group box
- */
-
-bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name)
-{
- SetName(name);
-
- if (parent) parent->AddChild(this);
-
- 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() const
-{
- int cx, cy;
- wxGetCharSize(GetHWND(), &cx, &cy, (wxFont*)&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()));
-
- wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID);
-
- // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush
- // has a zero usage count.
-// backgroundBrush->RealizeResource();
- return (WXHBRUSH) backgroundBrush->GetResourceHandle();
-*/
- return (WXHBRUSH)0;
-}
-
-// Shouldn't erase the whole window, since the static box must only paint its
-// outline.
-void wxStaticBox::OnEraseBackground(wxEraseEvent& event)