+int wxRadioBox::GetItemFromPoint(const wxPoint& pt) const
+{
+ const unsigned int count = GetCount();
+ for ( unsigned int i = 0; i < count; i++ )
+ {
+ RECT rect = wxGetWindowRect((*m_radioButtons)[i]);
+
+ if ( rect.left <= pt.x && pt.x < rect.right &&
+ rect.top <= pt.y && pt.y < rect.bottom )
+ {
+ return i;
+ }
+ }
+
+ return wxNOT_FOUND;
+}
+
+// ----------------------------------------------------------------------------
+// radio box drawing
+// ----------------------------------------------------------------------------
+
+#ifndef __WXWINCE__
+
+WXHRGN wxRadioBox::MSWGetRegionWithoutChildren()
+{
+ RECT rc;
+ ::GetWindowRect(GetHwnd(), &rc);
+ HRGN hrgn = ::CreateRectRgn(rc.left, rc.top, rc.right + 1, rc.bottom + 1);
+
+ const unsigned int count = GetCount();
+ for ( unsigned int i = 0; i < count; ++i )
+ {
+ // don't clip out hidden children
+ if ( !IsItemShown(i) )
+ continue;
+
+ ::GetWindowRect((*m_radioButtons)[i], &rc);
+ AutoHRGN hrgnchild(::CreateRectRgnIndirect(&rc));
+ ::CombineRgn(hrgn, hrgn, hrgnchild, RGN_DIFF);
+ }
+
+ return (WXHRGN)hrgn;
+}
+
+#endif // __WXWINCE__
+