From 9ae8168e5b1072e3a401abca3b0f40bc6afcc6ae Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 19 Nov 2004 19:05:12 +0000 Subject: [PATCH] removed OnCtlColor() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/radiobox.h | 3 -- src/msw/radiobox.cpp | 68 +-------------------------------------- 2 files changed, 1 insertion(+), 70 deletions(-) diff --git a/include/wx/msw/radiobox.h b/include/wx/msw/radiobox.h index 298850b905..d6dbac8bbe 100644 --- a/include/wx/msw/radiobox.h +++ b/include/wx/msw/radiobox.h @@ -113,9 +113,6 @@ public: virtual bool SetFont(const wxFont& font); WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, - WXWPARAM wParam, WXLPARAM lParam); WXHWND *GetRadioButtons() const { return m_radioButtons; } bool ContainsHWND(WXHWND hWnd) const; void SendNotificationEvent(); diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 877146bb80..e490720610 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -833,79 +833,13 @@ WXLRESULT wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara { switch ( nMsg ) { -#ifdef __WIN32__ case WM_CTLCOLORSTATIC: - // set the colour of the radio buttons to be the same as ours - { - HDC hdc = (HDC)wParam; - - const wxColour& colBack = GetBackgroundColour(); - ::SetBkColor(hdc, wxColourToRGB(colBack)); - ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); - - wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); - - return (WXLRESULT)brush->GetResourceHandle(); - } -#endif // Win32 - - // VZ: this code breaks radiobox redrawing under Windows XP, don't use - // it. If you need to get messages from the static controls, - // create them as a child of another (non static) window -#if 0 - // This is required for the radiobox to be sensitive to mouse input, - // e.g. for Dialog Editor. - case WM_NCHITTEST: - { - int xPos = LOWORD(lParam); // horizontal position of cursor - int yPos = HIWORD(lParam); // vertical position of cursor - - ScreenToClient(&xPos, &yPos); - - // Make sure you can drag by the top of the groupbox, but let - // other (enclosed) controls get mouse events also - if (yPos < 10) - return (long)HTCLIENT; - } - break; -#endif // 0 + return (WXLRESULT)GetStockObject(WHITE_BRUSH); } return wxControl::MSWWindowProc(nMsg, wParam, lParam); } -WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor), -#if wxUSE_CTL3D - WXUINT message, - WXWPARAM wParam, - WXLPARAM lParam -#else - WXUINT WXUNUSED(message), - WXWPARAM WXUNUSED(wParam), - WXLPARAM WXUNUSED(lParam) -#endif - ) -{ -#if wxUSE_CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; - } -#endif // wxUSE_CTL3D - - HDC hdc = (HDC)pDC; - wxColour colBack = GetBackgroundColour(); - - ::SetBkColor(hdc, wxColourToRGB(colBack)); - ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); - - wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); - - return (WXHBRUSH)brush->GetResourceHandle(); -} - - // --------------------------------------------------------------------------- // window proc for radio buttons // --------------------------------------------------------------------------- -- 2.45.2