]> git.saurik.com Git - wxWidgets.git/commitdiff
removed OnCtlColor()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Nov 2004 19:05:12 +0000 (19:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Nov 2004 19:05:12 +0000 (19:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/radiobox.h
src/msw/radiobox.cpp

index 298850b90567c053f5260c79c8b141bb7d2e6231..d6dbac8bbec1b206d61d9c02dc3d0000ef069a23 100644 (file)
@@ -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();
index 877146bb80f14b61259b461afb2eaa636029127b..e490720610941a6f0f39f03a28f11a4a0bc6f963 100644 (file)
@@ -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
 // ---------------------------------------------------------------------------