// size management including autosizing
// ----------------------------------------------------------------------------
-wxSize wxButton::DoGetBestSize()
+wxSize wxButton::DoGetBestSize() const
{
wxString label = wxGetWindowText(GetHWND());
int wBtn;
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