X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87a1e3085bc19deacd312a1dcf7d4eb89f51d5a3..0e0d88570a0605c9254d4f188dfb9d9ee9268e5a:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index e369bf170d..490c1154e4 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -128,7 +128,7 @@ wxButton::~wxButton() // size management including autosizing // ---------------------------------------------------------------------------- -wxSize wxButton::DoGetBestSize() +wxSize wxButton::DoGetBestSize() const { wxString label = wxGetWindowText(GetHWND()); int wBtn; @@ -242,29 +242,6 @@ bool wxButton::MSWCommand(WXUINT param, WXWORD id) return processed; } -WXHBRUSH wxButton::OnCtlColor(WXHDC pDC, - WXHWND pWnd, - WXUINT nCtlColor, - WXUINT message, - WXWPARAM wParam, - WXLPARAM lParam) -{ - const HDC& hdc = (HDC)pDC; - - const wxColour& colBack = GetBackgroundColour(); - ::SetBkColor(hdc, RGB(colBack.Red(), colBack.Green(), colBack.Blue())); - - const wxColour& colFor = GetForegroundColour(); - ::SetTextColor(hdc, RGB(colFor.Red(), colFor.Green(), colFor.Blue())); - - ::SetBkMode(hdc, OPAQUE); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(colBack, - wxSOLID); - backgroundBrush->RealizeResource(); - return (WXHBRUSH)backgroundBrush->GetResourceHandle(); -} - long wxButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { // make sure that we won't have BS_DEFPUSHBUTTON style any more if the