X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/222594ead7a8ed85cb0c709850b2eed07fc3ac86..dcf0fce44b34522ee1d3bef16a42b36cfd3c4bde:/src/msw/statbox.cpp?ds=sidebyside diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index 3607bf7d72..85ed4a9ade 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_STATBOX + #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/dcclient.h" @@ -41,9 +43,7 @@ // wxWin macros // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) -#endif +IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) // ============================================================================ // implementation @@ -70,7 +70,7 @@ bool wxStaticBox::Create(wxWindow *parent, return TRUE; } -wxSize wxStaticBox::DoGetBestSize() +wxSize wxStaticBox::DoGetBestSize() const { int cx, cy; wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); @@ -84,34 +84,6 @@ wxSize wxStaticBox::DoGetBestSize() return wxSize(wBox, hBox); } -WXHBRUSH wxStaticBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, - WXWPARAM wParam, - WXLPARAM lParam) -{ -#if wxUSE_CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; - } -#endif // wxUSE_CTL3D - - HDC hdc = (HDC)pDC; - if (GetParent()->GetTransparentBackground()) - SetBkMode(hdc, TRANSPARENT); - else - SetBkMode(hdc, OPAQUE); - - const wxColour& colBack = GetBackgroundColour(); - ::SetBkColor(hdc, wxColourToRGB(colBack)); - ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); - - wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); - - return (WXHBRUSH)brush->GetResourceHandle(); -} - long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { switch ( nMsg ) @@ -132,8 +104,6 @@ long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) } break; - // VZ: I will remove (or change) this soon... (15.11.99) -#if 0 case WM_ERASEBKGND: // prevent wxControl from processing this message because it will // erase the background incorrectly and there is no way for us to @@ -142,9 +112,9 @@ long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // without painting over other controls - and if we don't, // wxControl still gets it) return MSWDefWindowProc(nMsg, wParam, lParam); -#endif } return wxControl::MSWWindowProc(nMsg, wParam, lParam); } +#endif // wxUSE_STATBOX