1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/radiobox.cpp
3 // Purpose: wxRadioBox implementation
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ===========================================================================
14 // ===========================================================================
16 // ---------------------------------------------------------------------------
18 // ---------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
29 #include "wx/radiobox.h"
32 #include "wx/bitmap.h"
34 #include "wx/settings.h"
38 #include "wx/msw/subwin.h"
41 #include "wx/tooltip.h"
42 #endif // wxUSE_TOOLTIPS
44 // TODO: wxCONSTRUCTOR
45 #if 0 // wxUSE_EXTENDED_RTTI
46 WX_DEFINE_FLAGS( wxRadioBoxStyle
)
48 wxBEGIN_FLAGS( wxRadioBoxStyle
)
49 // new style border flags, we put them first to
50 // use them for streaming out
51 wxFLAGS_MEMBER(wxBORDER_SIMPLE
)
52 wxFLAGS_MEMBER(wxBORDER_SUNKEN
)
53 wxFLAGS_MEMBER(wxBORDER_DOUBLE
)
54 wxFLAGS_MEMBER(wxBORDER_RAISED
)
55 wxFLAGS_MEMBER(wxBORDER_STATIC
)
56 wxFLAGS_MEMBER(wxBORDER_NONE
)
58 // old style border flags
59 wxFLAGS_MEMBER(wxSIMPLE_BORDER
)
60 wxFLAGS_MEMBER(wxSUNKEN_BORDER
)
61 wxFLAGS_MEMBER(wxDOUBLE_BORDER
)
62 wxFLAGS_MEMBER(wxRAISED_BORDER
)
63 wxFLAGS_MEMBER(wxSTATIC_BORDER
)
64 wxFLAGS_MEMBER(wxBORDER
)
66 // standard window styles
67 wxFLAGS_MEMBER(wxTAB_TRAVERSAL
)
68 wxFLAGS_MEMBER(wxCLIP_CHILDREN
)
69 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW
)
70 wxFLAGS_MEMBER(wxWANTS_CHARS
)
71 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE
)
72 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB
)
73 wxFLAGS_MEMBER(wxVSCROLL
)
74 wxFLAGS_MEMBER(wxHSCROLL
)
76 wxFLAGS_MEMBER(wxRA_SPECIFY_COLS
)
77 wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS
)
78 wxEND_FLAGS( wxRadioBoxStyle
)
80 IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox
, wxControl
,"wx/radiobox.h")
82 wxBEGIN_PROPERTIES_TABLE(wxRadioBox
)
83 wxEVENT_PROPERTY( Select
, wxEVT_COMMAND_RADIOBOX_SELECTED
, wxCommandEvent
)
84 wxPROPERTY_FLAGS( WindowStyle
, wxRadioBoxStyle
, long , SetWindowStyleFlag
, GetWindowStyleFlag
, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
85 wxEND_PROPERTIES_TABLE()
88 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
99 // ---------------------------------------------------------------------------
101 // ---------------------------------------------------------------------------
103 // wnd proc for radio buttons
104 LRESULT APIENTRY _EXPORT
wxRadioBtnWndProc(HWND hWnd
,
109 // ---------------------------------------------------------------------------
111 // ---------------------------------------------------------------------------
113 // the pointer to standard radio button wnd proc
114 static WXFARPROC s_wndprocRadioBtn
= (WXFARPROC
)NULL
;
116 // ===========================================================================
118 // ===========================================================================
120 // ---------------------------------------------------------------------------
121 // wxRadioBox creation
122 // ---------------------------------------------------------------------------
125 void wxRadioBox::Init()
127 m_selectedButton
= wxNOT_FOUND
;
128 m_radioButtons
= NULL
;
131 m_radioHeight
= NULL
;
134 bool wxRadioBox::Create(wxWindow
*parent
,
136 const wxString
& title
,
140 const wxString choices
[],
143 const wxValidator
& val
,
144 const wxString
& name
)
146 // common initialization
147 if ( !wxStaticBox::Create(parent
, id
, title
, pos
, size
, style
, name
) )
150 // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS
151 // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case
152 if ( !(style
& (wxRA_SPECIFY_ROWS
| wxRA_SPECIFY_COLS
)) )
153 style
|= wxRA_SPECIFY_COLS
;
159 #endif // wxUSE_VALIDATORS/!wxUSE_VALIDATORS
161 // We need an extra one to keep track of the 'dummy' item we
162 // create to end the radio group, so it will be destroyed and
163 // it's id will be released. But we want it separate from the
164 // other buttons since the wxSubwindows will operate on it as
165 // well and we just want to ignore it until destroying it.
166 // For instance, we don't want the bounding box of the radio
167 // buttons to include the dummy button
168 m_radioButtons
= new wxSubwindows(n
);
170 m_radioWidth
= new int[n
];
171 m_radioHeight
= new int[n
];
173 for ( int i
= 0; i
< n
; i
++ )
176 m_radioHeight
[i
] = wxDefaultCoord
;
177 long styleBtn
= BS_AUTORADIOBUTTON
| WS_TABSTOP
| WS_CHILD
| WS_VISIBLE
;
179 styleBtn
|= WS_GROUP
;
181 wxWindowIDRef subid
= NewControlId();
183 HWND hwndBtn
= ::CreateWindow(wxT("BUTTON"),
186 0, 0, 0, 0, // will be set in SetSize()
188 (HMENU
)wxUIntToPtr(subid
.GetValue()),
194 wxLogLastError(wxT("CreateWindow(radio btn)"));
199 // Keep track of the subwindow
200 m_radioButtons
->Set(i
, hwndBtn
, subid
);
202 SubclassRadioButton((WXHWND
)hwndBtn
);
204 // Also, make it a subcontrol of this control
205 m_subControls
.Add(subid
);
208 // Create a dummy radio control to end the group.
209 m_dummyId
= NewControlId();
211 m_dummyHwnd
= (WXHWND
)::CreateWindow(wxT("BUTTON"),
213 WS_GROUP
| BS_AUTORADIOBUTTON
| WS_CHILD
,
214 0, 0, 0, 0, GetHwndOf(parent
),
215 (HMENU
)wxUIntToPtr(m_dummyId
.GetValue()),
216 wxGetInstance(), NULL
);
219 m_radioButtons
->SetFont(GetFont());
222 // Set the z-order correctly
223 SetWindowPos(GetHwnd(), HWND_BOTTOM
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
226 SetMajorDim(majorDim
== 0 ? n
: majorDim
, style
);
228 SetSize(pos
.x
, pos
.y
, size
.x
, size
.y
);
230 // Now that we have items determine what is the best size and set it.
231 SetInitialSize(size
);
236 bool wxRadioBox::Create(wxWindow
*parent
,
238 const wxString
& title
,
241 const wxArrayString
& choices
,
244 const wxValidator
& val
,
245 const wxString
& name
)
247 wxCArrayString
chs(choices
);
248 return Create(parent
, id
, title
, pos
, size
, chs
.GetCount(),
249 chs
.GetStrings(), majorDim
, style
, val
, name
);
252 wxRadioBox::~wxRadioBox()
256 delete m_radioButtons
;
258 DestroyWindow((HWND
)m_dummyHwnd
);
259 delete[] m_radioWidth
;
260 delete[] m_radioHeight
;
263 // NB: if this code is changed, wxGetWindowForHWND() which relies on having the
264 // radiobox pointer in GWL_USERDATA for radio buttons must be updated too!
265 void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn
)
267 HWND hwndBtn
= (HWND
)hWndBtn
;
269 if ( !s_wndprocRadioBtn
)
270 s_wndprocRadioBtn
= (WXFARPROC
)wxGetWindowProc(hwndBtn
);
272 wxSetWindowProc(hwndBtn
, wxRadioBtnWndProc
);
273 wxSetWindowUserData(hwndBtn
, this);
276 // ----------------------------------------------------------------------------
278 // ----------------------------------------------------------------------------
280 bool wxRadioBox::MSWCommand(WXUINT cmd
, WXWORD id_
)
282 const int id
= (signed short)id_
;
284 if ( cmd
== BN_CLICKED
)
289 int selectedButton
= wxNOT_FOUND
;
291 const unsigned int count
= GetCount();
292 for ( unsigned int i
= 0; i
< count
; i
++ )
294 const HWND hwndBtn
= (*m_radioButtons
)[i
];
295 if ( id
== wxGetWindowId(hwndBtn
) )
297 // we can get BN_CLICKED for a button which just became focused
298 // but it may not be checked, in which case we shouldn't
299 // generate a radiobox selection changed event for it
300 if ( ::SendMessage(hwndBtn
, BM_GETCHECK
, 0, 0) == BST_CHECKED
)
307 if ( selectedButton
== wxNOT_FOUND
)
309 // just ignore it - due to a hack with WM_NCHITTEST handling in our
310 // wnd proc, we can receive dummy click messages when we click near
311 // the radiobox edge (this is ugly but Julian wouldn't let me get
316 if ( selectedButton
!= m_selectedButton
)
318 m_selectedButton
= selectedButton
;
320 SendNotificationEvent();
322 //else: don't generate events when the selection doesn't change
330 void wxRadioBox::Command(wxCommandEvent
& event
)
332 SetSelection (event
.GetInt());
334 ProcessCommand(event
);
337 void wxRadioBox::SendNotificationEvent()
339 wxCommandEvent
event(wxEVT_COMMAND_RADIOBOX_SELECTED
, m_windowId
);
340 event
.SetInt( m_selectedButton
);
341 event
.SetString(GetString(m_selectedButton
));
342 event
.SetEventObject( this );
343 ProcessCommand(event
);
346 // ----------------------------------------------------------------------------
348 // ----------------------------------------------------------------------------
350 unsigned int wxRadioBox::GetCount() const
352 return m_radioButtons
? m_radioButtons
->GetCount() : 0u;
355 void wxRadioBox::SetString(unsigned int item
, const wxString
& label
)
357 wxCHECK_RET( IsValid(item
), wxT("invalid radiobox index") );
360 m_radioHeight
[item
] = wxDefaultCoord
;
362 ::SetWindowText((*m_radioButtons
)[item
], label
.c_str());
364 InvalidateBestSize();
367 void wxRadioBox::SetSelection(int N
)
369 wxCHECK_RET( IsValid(N
), wxT("invalid radiobox index") );
371 // unselect the old button
372 if ( m_selectedButton
!= wxNOT_FOUND
)
373 ::SendMessage((*m_radioButtons
)[m_selectedButton
], BM_SETCHECK
, 0, 0L);
375 // and select the new one
376 ::SendMessage((*m_radioButtons
)[N
], BM_SETCHECK
, 1, 0L);
378 m_selectedButton
= N
;
381 // Find string for position
382 wxString
wxRadioBox::GetString(unsigned int item
) const
384 wxCHECK_MSG( IsValid(item
), wxEmptyString
,
385 wxT("invalid radiobox index") );
387 return wxGetWindowText((*m_radioButtons
)[item
]);
390 void wxRadioBox::SetFocus()
392 if ( GetCount() > 0 )
394 ::SetFocus((*m_radioButtons
)[m_selectedButton
== wxNOT_FOUND
396 : m_selectedButton
]);
400 // Enable a specific button
401 bool wxRadioBox::Enable(unsigned int item
, bool enable
)
403 wxCHECK_MSG( IsValid(item
), false,
404 wxT("invalid item in wxRadioBox::Enable()") );
406 BOOL ret
= ::EnableWindow((*m_radioButtons
)[item
], enable
);
408 return (ret
== 0) != enable
;
411 bool wxRadioBox::IsItemEnabled(unsigned int item
) const
413 wxCHECK_MSG( IsValid(item
), false,
414 wxT("invalid item in wxRadioBox::IsItemEnabled()") );
416 return ::IsWindowEnabled((*m_radioButtons
)[item
]) != 0;
419 // Show a specific button
420 bool wxRadioBox::Show(unsigned int item
, bool show
)
422 wxCHECK_MSG( IsValid(item
), false,
423 wxT("invalid item in wxRadioBox::Show()") );
425 BOOL ret
= ::ShowWindow((*m_radioButtons
)[item
], show
? SW_SHOW
: SW_HIDE
);
427 bool changed
= (ret
!= 0) != show
;
430 InvalidateBestSize();
436 bool wxRadioBox::IsItemShown(unsigned int item
) const
438 wxCHECK_MSG( IsValid(item
), false,
439 wxT("invalid item in wxRadioBox::IsItemShown()") );
441 // don't use IsWindowVisible() here because it would return false if the
442 // radiobox itself is hidden while we want to only return false if this
443 // button specifically is hidden
444 return (::GetWindowLong((*m_radioButtons
)[item
],
445 GWL_STYLE
) & WS_VISIBLE
) != 0;
450 bool wxRadioBox::HasToolTips() const
452 return wxStaticBox::HasToolTips() || wxRadioBoxBase::HasItemToolTips();
455 void wxRadioBox::DoSetItemToolTip(unsigned int item
, wxToolTip
*tooltip
)
457 // we have already checked for the item to be valid in wxRadioBoxBase
458 const HWND hwndRbtn
= (*m_radioButtons
)[item
];
459 if ( tooltip
!= NULL
)
460 tooltip
->Add(hwndRbtn
);
461 else // unset the tooltip
462 wxToolTip::Remove(hwndRbtn
, 0, wxRect(0,0,0,0));
463 // the second parameter can be zero since it's ignored by Remove()
464 // as we pass a rect for which wxRect::IsEmpty()==true...
467 #endif // wxUSE_TOOLTIPS
469 bool wxRadioBox::Reparent(wxWindowBase
*newParent
)
471 if ( !wxStaticBox::Reparent(newParent
) )
476 HWND hwndParent
= GetHwndOf(GetParent());
477 for ( size_t item
= 0; item
< m_radioButtons
->GetCount(); item
++ )
479 ::SetParent((*m_radioButtons
)[item
], hwndParent
);
482 // put static box under the buttons in the Z-order
483 SetWindowPos(GetHwnd(), HWND_BOTTOM
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
488 WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxRadioBox
, wxStaticBox
, m_radioButtons
)
490 // ----------------------------------------------------------------------------
492 // ----------------------------------------------------------------------------
494 wxSize
wxRadioBox::GetMaxButtonSize() const
496 // calculate the max button size
499 const unsigned int count
= GetCount();
500 for ( unsigned int i
= 0 ; i
< count
; i
++ )
503 if ( m_radioWidth
[i
] < 0 )
505 GetTextExtent(wxGetWindowText((*m_radioButtons
)[i
]), &width
, &height
);
507 // adjust the size to take into account the radio box itself
508 // FIXME this is totally bogus!
515 width
= m_radioWidth
[i
];
516 height
= m_radioHeight
[i
];
519 if ( widthMax
< width
)
521 if ( heightMax
< height
)
525 return wxSize(widthMax
, heightMax
);
528 wxSize
wxRadioBox::GetTotalButtonSize(const wxSize
& sizeBtn
) const
530 // the radiobox should be big enough for its buttons
532 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, GetFont());
534 int extraHeight
= cy1
;
536 int height
= GetRowCount() * sizeBtn
.y
+ cy1
/2 + extraHeight
;
537 int width
= GetColumnCount() * (sizeBtn
.x
+ cx1
) + cx1
;
539 // Add extra space under the label, if it exists.
540 if (!wxControl::GetLabel().empty())
543 // and also wide enough for its label
545 GetTextExtent(GetLabelText(), &widthLabel
, NULL
);
546 widthLabel
+= RADIO_SIZE
; // FIXME this is bogus too
547 if ( widthLabel
> width
)
550 return wxSize(width
, height
);
553 wxSize
wxRadioBox::DoGetBestSize() const
555 if ( !m_radioButtons
)
557 // if we're not fully initialized yet, we can't meaningfully compute
558 // our best size, we'll do it later
562 wxSize best
= GetTotalButtonSize(GetMaxButtonSize());
567 void wxRadioBox::DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
569 if ( (width
== wxDefaultCoord
&& (sizeFlags
& wxSIZE_AUTO_WIDTH
)) ||
570 (height
== wxDefaultCoord
&& (sizeFlags
& wxSIZE_AUTO_HEIGHT
)) )
572 // Attempt to have a look coherent with other platforms: We compute the
573 // biggest toggle dim, then we align all items according this value.
574 const wxSize totSize
= GetTotalButtonSize(GetMaxButtonSize());
576 // only change our width/height if asked for
577 if ( width
== wxDefaultCoord
&& (sizeFlags
& wxSIZE_AUTO_WIDTH
) )
580 if ( height
== wxDefaultCoord
&& (sizeFlags
& wxSIZE_AUTO_HEIGHT
) )
584 wxStaticBox::DoSetSize(x
, y
, width
, height
);
587 void wxRadioBox::DoMoveWindow(int x
, int y
, int width
, int height
)
589 wxStaticBox::DoMoveWindow(x
, y
, width
, height
);
591 wxSize maxSize
= GetMaxButtonSize();
592 int maxWidth
= maxSize
.x
,
593 maxHeight
= maxSize
.y
;
595 // Now position all the buttons: the current button will be put at
596 // wxPoint(x_offset, y_offset) and the new row/column will start at
597 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
598 // maxHeight) except for the buttons in the last column which should extend
599 // to the right border of radiobox and thus can be wider than this.
601 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
602 // left to right order and GetMajorDim() is the number of columns while
603 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
604 // GetMajorDim() is the number of rows.
607 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, GetFont());
609 int x_offset
= x
+ cx1
;
610 int y_offset
= y
+ cy1
;
612 // Add extra space under the label, if it exists.
613 if (!wxControl::GetLabel().empty())
616 int startX
= x_offset
;
617 int startY
= y_offset
;
619 const unsigned int count
= GetCount();
620 for (unsigned int i
= 0; i
< count
; i
++)
622 // the last button in the row may be wider than the other ones as the
623 // radiobox may be wider than the sum of the button widths (as it
624 // happens, for example, when the radiobox label is very long)
626 if ( m_windowStyle
& wxRA_SPECIFY_COLS
)
628 // item is the last in its row if it is a multiple of the number of
629 // columns or if it is just the last item
630 unsigned int n
= i
+ 1;
631 isLastInTheRow
= ((n
% GetMajorDim()) == 0) || (n
== count
);
633 else // wxRA_SPECIFY_ROWS
635 // item is the last in the row if it is in the last columns
636 isLastInTheRow
= i
>= (count
/GetMajorDim())*GetMajorDim();
639 // is this the start of new row/column?
640 if ( i
&& (i
% GetMajorDim() == 0) )
642 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
644 // start of new column
646 x_offset
+= maxWidth
+ cx1
;
648 else // start of new row
651 y_offset
+= maxHeight
;
652 if (m_radioWidth
[0]>0)
658 if ( isLastInTheRow
)
660 // make the button go to the end of radio box
661 widthBtn
= startX
+ width
- x_offset
- 2*cx1
;
662 if ( widthBtn
< maxWidth
)
667 // normal button, always of the same size
671 // make all buttons of the same, maximal size - like this they cover
672 // the radiobox entirely and the radiobox tooltips are always shown
673 // (otherwise they are not when the mouse pointer is in the radiobox
674 // part not belonging to any radiobutton)
675 DoMoveSibling((*m_radioButtons
)[i
], x_offset
, y_offset
, widthBtn
, maxHeight
);
677 // where do we put the next button?
678 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
681 y_offset
+= maxHeight
;
682 if (m_radioWidth
[0]>0)
687 // to the right of this one
688 x_offset
+= widthBtn
+ cx1
;
693 int wxRadioBox::GetItemFromPoint(const wxPoint
& pt
) const
695 const unsigned int count
= GetCount();
696 for ( unsigned int i
= 0; i
< count
; i
++ )
698 RECT rect
= wxGetWindowRect((*m_radioButtons
)[i
]);
700 if ( rect
.left
<= pt
.x
&& pt
.x
< rect
.right
&&
701 rect
.top
<= pt
.y
&& pt
.y
< rect
.bottom
)
710 // ----------------------------------------------------------------------------
712 // ----------------------------------------------------------------------------
716 WXHRGN
wxRadioBox::MSWGetRegionWithoutChildren()
719 ::GetWindowRect(GetHwnd(), &rc
);
720 HRGN hrgn
= ::CreateRectRgn(rc
.left
, rc
.top
, rc
.right
+ 1, rc
.bottom
+ 1);
722 const unsigned int count
= GetCount();
723 for ( unsigned int i
= 0; i
< count
; ++i
)
725 // don't clip out hidden children
726 if ( !IsItemShown(i
) )
729 ::GetWindowRect((*m_radioButtons
)[i
], &rc
);
730 AutoHRGN
hrgnchild(::CreateRectRgnIndirect(&rc
));
731 ::CombineRgn(hrgn
, hrgn
, hrgnchild
, RGN_DIFF
);
737 #endif // __WXWINCE__
739 // ---------------------------------------------------------------------------
740 // window proc for radio buttons
741 // ---------------------------------------------------------------------------
743 LRESULT APIENTRY _EXPORT
wxRadioBtnWndProc(HWND hwnd
,
751 // we must tell IsDialogMessage()/our kbd processing code that we
752 // want to process arrows ourselves because neither of them is
753 // smart enough to handle arrows properly for us
755 long lDlgCode
= ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
,
756 message
, wParam
, lParam
);
758 return lDlgCode
| DLGC_WANTARROWS
;
763 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
765 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
767 bool processed
= true;
791 // just to suppress the compiler warning
797 int selOld
= radiobox
->GetSelection();
798 int selNew
= radiobox
->GetNextItem
802 radiobox
->GetWindowStyle()
805 if ( selNew
!= selOld
)
807 radiobox
->SetSelection(selNew
);
808 radiobox
->SetFocus();
810 // emulate the button click
811 radiobox
->SendNotificationEvent();
822 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
824 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
826 // if we don't do this, no focus events are generated for the
827 // radiobox and, besides, we need to notify the parent about
828 // the focus change, otherwise the focus handling logic in
829 // wxControlContainer doesn't work
830 if ( message
== WM_SETFOCUS
)
831 radiobox
->HandleSetFocus((WXHWND
)wParam
);
833 radiobox
->HandleKillFocus((WXHWND
)wParam
);
840 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
842 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
844 bool processed
= false;
846 wxEvtHandler
* const handler
= radiobox
->GetEventHandler();
848 HELPINFO
* info
= (HELPINFO
*) lParam
;
849 if ( info
->iContextType
== HELPINFO_WINDOW
)
851 for ( wxWindow
* subjectOfHelp
= radiobox
;
853 subjectOfHelp
= subjectOfHelp
->GetParent() )
855 wxHelpEvent
helpEvent(wxEVT_HELP
,
856 subjectOfHelp
->GetId(),
857 wxPoint(info
->MousePos
.x
,
859 helpEvent
.SetEventObject(radiobox
);
860 if ( handler
->ProcessEvent(helpEvent
) )
867 else if (info
->iContextType
== HELPINFO_MENUITEM
)
869 wxHelpEvent
helpEvent(wxEVT_HELP
, info
->iCtrlId
);
870 helpEvent
.SetEventObject(radiobox
);
871 processed
= handler
->ProcessEvent(helpEvent
);
878 #endif // !__WXWINCE__
881 return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
, message
, wParam
, lParam
);
884 #endif // wxUSE_RADIOBOX