X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4fe5383d6c6463e16e2d5b6b5fefe311b33e128f..c6e62f74fcac5b62889b59e7ce7a41d0ce884d7b:/src/msw/stattext.cpp diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 38d249d3cb..b7e0f01365 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -30,9 +30,7 @@ #include "wx/msw/private.h" #include -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -#endif bool wxStaticText::Create(wxWindow *parent, wxWindowID id, const wxString& label, @@ -94,7 +92,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, return TRUE; } -wxSize wxStaticText::DoGetBestSize() +wxSize wxStaticText::DoGetBestSize() const { wxString text(wxGetWindowText(GetHWND())); @@ -150,39 +148,6 @@ void wxStaticText::SetLabel(const wxString& label) } } -WXHBRUSH wxStaticText::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); - - if (hbrush != (HBRUSH) 0) - return hbrush; - else - return (HBRUSH)MSWDefWindowProc(message, wParam, lParam); - } -#endif -*/ - - 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(); -} - long wxStaticText::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { // Ensure that static items get messages. Some controls don't like this