]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/radiobox.cpp
return begining of the selection for GetInsertionPoint to match what
[wxWidgets.git] / src / msw / radiobox.cpp
index 26890f192c9e985ffc3833e8938f07b5bc8b6a52..ac037051d8886a3b518767dc06957e889de79c34 100644 (file)
@@ -667,6 +667,30 @@ WXHRGN wxRadioBox::MSWGetRegionWithoutChildren()
     return (WXHRGN)hrgn;
 }
 
+WXLRESULT
+wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+{
+    if ( nMsg == WM_PRINTCLIENT )
+    {
+        // we have to process WM_PRINTCLIENT ourselves as otherwise the radio
+        // buttons background would never be drawn unless we have a parent with
+        // non default background
+
+        // so check first if we have one
+        if ( !HandlePrintClient((WXHDC)wParam) )
+        {
+            // no, we don't, erase the background ourselves (don't use our own
+            // colour as with static box, see comments there)
+            wxFillRect(GetHwnd(), (HDC)wParam,
+                        GetHbrushOf(wxBrush(GetParent()->GetBackgroundColour())));
+        }
+
+        return 0;
+    }
+
+    return wxStaticBox::MSWWindowProc(nMsg, wParam, lParam);
+}
+
 #endif // __WXWINCE__
 
 // ---------------------------------------------------------------------------
@@ -832,8 +856,6 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
 
                 if ( processed )
                     return 0;
-
-                break;
             }
             break;
 #endif // !__WXWINCE__