X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4fe5383d6c6463e16e2d5b6b5fefe311b33e128f..9fc3ad34c5326856aeebf02335244ae315cef688:/src/msw/stattext.cpp diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 38d249d3cb..4ab6b6c42d 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -94,7 +94,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, return TRUE; } -wxSize wxStaticText::DoGetBestSize() +wxSize wxStaticText::DoGetBestSize() const { wxString text(wxGetWindowText(GetHWND())); @@ -150,39 +150,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