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_HORIZONTAL
)
78 wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS
)
79 wxFLAGS_MEMBER(wxRA_VERTICAL
)
81 wxEND_FLAGS( wxRadioBoxStyle
)
83 IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox
, wxControl
,"wx/radiobox.h")
85 wxBEGIN_PROPERTIES_TABLE(wxRadioBox
)
86 wxEVENT_PROPERTY( Select
, wxEVT_COMMAND_RADIOBOX_SELECTED
, wxCommandEvent
)
87 wxPROPERTY_FLAGS( WindowStyle
, wxRadioBoxStyle
, long , SetWindowStyleFlag
, GetWindowStyleFlag
, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
88 wxEND_PROPERTIES_TABLE()
91 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
102 // ---------------------------------------------------------------------------
104 // ---------------------------------------------------------------------------
106 // wnd proc for radio buttons
107 LRESULT APIENTRY _EXPORT
wxRadioBtnWndProc(HWND hWnd
,
112 // ---------------------------------------------------------------------------
114 // ---------------------------------------------------------------------------
116 // the pointer to standard radio button wnd proc
117 static WXFARPROC s_wndprocRadioBtn
= (WXFARPROC
)NULL
;
119 // ===========================================================================
121 // ===========================================================================
123 // ---------------------------------------------------------------------------
124 // wxRadioBox creation
125 // ---------------------------------------------------------------------------
128 void wxRadioBox::Init()
130 m_selectedButton
= wxNOT_FOUND
;
131 m_radioButtons
= NULL
;
134 m_radioHeight
= NULL
;
137 bool wxRadioBox::Create(wxWindow
*parent
,
139 const wxString
& title
,
143 const wxString choices
[],
146 const wxValidator
& val
,
147 const wxString
& name
)
149 // common initialization
150 if ( !wxStaticBox::Create(parent
, id
, title
, pos
, size
, style
, name
) )
157 #endif // wxUSE_VALIDATORS/!wxUSE_VALIDATORS
159 // We need an extra one to keep track of the 'dummy' item we
160 // create to end the radio group, so it will be destroyed and
161 // it's id will be released. But we want it separate from the
162 // other buttons since the wxSubwindows will operate on it as
163 // well and we just want to ignore it until destroying it.
164 // For instance, we don't want the bounding box of the radio
165 // buttons to include the dummy button
166 m_radioButtons
= new wxSubwindows(n
);
168 m_radioWidth
= new int[n
];
169 m_radioHeight
= new int[n
];
171 for ( int i
= 0; i
< n
; i
++ )
174 m_radioHeight
[i
] = wxDefaultCoord
;
175 long styleBtn
= BS_AUTORADIOBUTTON
| WS_TABSTOP
| WS_CHILD
| WS_VISIBLE
;
177 styleBtn
|= WS_GROUP
;
179 wxWindowIDRef subid
= NewControlId();
181 HWND hwndBtn
= ::CreateWindow(_T("BUTTON"),
184 0, 0, 0, 0, // will be set in SetSize()
186 (HMENU
)subid
.GetValue(),
192 wxLogLastError(wxT("CreateWindow(radio btn)"));
197 // Keep track of the subwindow
198 m_radioButtons
->Set(i
, hwndBtn
, subid
);
200 SubclassRadioButton((WXHWND
)hwndBtn
);
202 // Also, make it a subcontrol of this control
203 m_subControls
.Add(subid
);
206 // Create a dummy radio control to end the group.
207 m_dummyId
= NewControlId();
209 m_dummyHwnd
= (WXHWND
)::CreateWindow(_T("BUTTON"),
211 WS_GROUP
| BS_AUTORADIOBUTTON
| WS_CHILD
,
212 0, 0, 0, 0, GetHwndOf(parent
),
213 (HMENU
)m_dummyId
.GetValue(), wxGetInstance(), NULL
);
216 m_radioButtons
->SetFont(GetFont());
219 // Set the z-order correctly
220 SetWindowPos(GetHwnd(), HWND_BOTTOM
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
223 SetMajorDim(majorDim
== 0 ? n
: majorDim
, style
);
225 SetSize(pos
.x
, pos
.y
, size
.x
, size
.y
);
227 // Now that we have items determine what is the best size and set it.
228 SetInitialSize(size
);
233 bool wxRadioBox::Create(wxWindow
*parent
,
235 const wxString
& title
,
238 const wxArrayString
& choices
,
241 const wxValidator
& val
,
242 const wxString
& name
)
244 wxCArrayString
chs(choices
);
245 return Create(parent
, id
, title
, pos
, size
, chs
.GetCount(),
246 chs
.GetStrings(), majorDim
, style
, val
, name
);
249 wxRadioBox::~wxRadioBox()
251 m_isBeingDeleted
= true;
253 delete m_radioButtons
;
255 DestroyWindow((HWND
)m_dummyHwnd
);
256 delete[] m_radioWidth
;
257 delete[] m_radioHeight
;
260 // NB: if this code is changed, wxGetWindowForHWND() which relies on having the
261 // radiobox pointer in GWL_USERDATA for radio buttons must be updated too!
262 void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn
)
264 HWND hwndBtn
= (HWND
)hWndBtn
;
266 if ( !s_wndprocRadioBtn
)
267 s_wndprocRadioBtn
= (WXFARPROC
)wxGetWindowProc(hwndBtn
);
269 wxSetWindowProc(hwndBtn
, wxRadioBtnWndProc
);
270 wxSetWindowUserData(hwndBtn
, this);
273 // ----------------------------------------------------------------------------
275 // ----------------------------------------------------------------------------
277 bool wxRadioBox::MSWCommand(WXUINT cmd
, WXWORD id_
)
279 const int id
= (signed short)id_
;
281 if ( cmd
== BN_CLICKED
)
286 int selectedButton
= wxNOT_FOUND
;
288 const unsigned int count
= GetCount();
289 for ( unsigned int i
= 0; i
< count
; i
++ )
291 const HWND hwndBtn
= (*m_radioButtons
)[i
];
292 if ( id
== wxGetWindowId(hwndBtn
) )
294 // we can get BN_CLICKED for a button which just became focused
295 // but it may not be checked, in which case we shouldn't
296 // generate a radiobox selection changed event for it
297 if ( ::SendMessage(hwndBtn
, BM_GETCHECK
, 0, 0) == BST_CHECKED
)
304 if ( selectedButton
== wxNOT_FOUND
)
306 // just ignore it - due to a hack with WM_NCHITTEST handling in our
307 // wnd proc, we can receive dummy click messages when we click near
308 // the radiobox edge (this is ugly but Julian wouldn't let me get
313 if ( selectedButton
!= m_selectedButton
)
315 m_selectedButton
= selectedButton
;
317 SendNotificationEvent();
319 //else: don't generate events when the selection doesn't change
327 void wxRadioBox::Command(wxCommandEvent
& event
)
329 SetSelection (event
.GetInt());
331 ProcessCommand(event
);
334 void wxRadioBox::SendNotificationEvent()
336 wxCommandEvent
event(wxEVT_COMMAND_RADIOBOX_SELECTED
, m_windowId
);
337 event
.SetInt( m_selectedButton
);
338 event
.SetString(GetString(m_selectedButton
));
339 event
.SetEventObject( this );
340 ProcessCommand(event
);
343 // ----------------------------------------------------------------------------
345 // ----------------------------------------------------------------------------
347 unsigned int wxRadioBox::GetCount() const
349 return m_radioButtons
? m_radioButtons
->GetCount() : 0u;
352 void wxRadioBox::SetString(unsigned int item
, const wxString
& label
)
354 wxCHECK_RET( IsValid(item
), wxT("invalid radiobox index") );
357 m_radioHeight
[item
] = wxDefaultCoord
;
359 ::SetWindowText((*m_radioButtons
)[item
], label
.c_str());
361 InvalidateBestSize();
364 void wxRadioBox::SetSelection(int N
)
366 wxCHECK_RET( IsValid(N
), wxT("invalid radiobox index") );
368 // unselect the old button
369 if ( m_selectedButton
!= wxNOT_FOUND
)
370 ::SendMessage((*m_radioButtons
)[m_selectedButton
], BM_SETCHECK
, 0, 0L);
372 // and select the new one
373 ::SendMessage((*m_radioButtons
)[N
], BM_SETCHECK
, 1, 0L);
375 m_selectedButton
= N
;
378 // Find string for position
379 wxString
wxRadioBox::GetString(unsigned int item
) const
381 wxCHECK_MSG( IsValid(item
), wxEmptyString
,
382 wxT("invalid radiobox index") );
384 return wxGetWindowText((*m_radioButtons
)[item
]);
387 void wxRadioBox::SetFocus()
389 if ( GetCount() > 0 )
391 ::SetFocus((*m_radioButtons
)[m_selectedButton
== wxNOT_FOUND
393 : m_selectedButton
]);
397 // Enable a specific button
398 bool wxRadioBox::Enable(unsigned int item
, bool enable
)
400 wxCHECK_MSG( IsValid(item
), false,
401 wxT("invalid item in wxRadioBox::Enable()") );
403 BOOL ret
= ::EnableWindow((*m_radioButtons
)[item
], enable
);
405 return (ret
== 0) != enable
;
408 bool wxRadioBox::IsItemEnabled(unsigned int item
) const
410 wxCHECK_MSG( IsValid(item
), false,
411 wxT("invalid item in wxRadioBox::IsItemEnabled()") );
413 return ::IsWindowEnabled((*m_radioButtons
)[item
]) != 0;
416 // Show a specific button
417 bool wxRadioBox::Show(unsigned int item
, bool show
)
419 wxCHECK_MSG( IsValid(item
), false,
420 wxT("invalid item in wxRadioBox::Show()") );
422 BOOL ret
= ::ShowWindow((*m_radioButtons
)[item
], show
? SW_SHOW
: SW_HIDE
);
424 bool changed
= (ret
!= 0) != show
;
427 InvalidateBestSize();
433 bool wxRadioBox::IsItemShown(unsigned int item
) const
435 wxCHECK_MSG( IsValid(item
), false,
436 wxT("invalid item in wxRadioBox::IsItemShown()") );
438 // don't use IsWindowVisible() here because it would return false if the
439 // radiobox itself is hidden while we want to only return false if this
440 // button specifically is hidden
441 return (::GetWindowLong((*m_radioButtons
)[item
],
442 GWL_STYLE
) & WS_VISIBLE
) != 0;
447 bool wxRadioBox::HasToolTips() const
449 return wxStaticBox::HasToolTips() || wxRadioBoxBase::HasItemToolTips();
452 void wxRadioBox::DoSetItemToolTip(unsigned int item
, wxToolTip
*tooltip
)
454 // we have already checked for the item to be valid in wxRadioBoxBase
455 const HWND hwndRbtn
= (*m_radioButtons
)[item
];
456 if ( tooltip
!= NULL
)
457 tooltip
->Add(hwndRbtn
);
458 else // unset the tooltip
459 wxToolTip::Remove(hwndRbtn
);
462 #endif // wxUSE_TOOLTIPS
464 bool wxRadioBox::Reparent(wxWindowBase
*newParent
)
466 if ( !wxStaticBox::Reparent(newParent
) )
471 HWND hwndParent
= GetHwndOf(GetParent());
472 for ( size_t item
= 0; item
< m_radioButtons
->GetCount(); item
++ )
474 ::SetParent((*m_radioButtons
)[item
], hwndParent
);
477 // put static box under the buttons in the Z-order
478 SetWindowPos(GetHwnd(), HWND_BOTTOM
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
483 WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxRadioBox
, wxStaticBox
, m_radioButtons
)
485 // ----------------------------------------------------------------------------
487 // ----------------------------------------------------------------------------
489 wxSize
wxRadioBox::GetMaxButtonSize() const
491 // calculate the max button size
494 const unsigned int count
= GetCount();
495 for ( unsigned int i
= 0 ; i
< count
; i
++ )
498 if ( m_radioWidth
[i
] < 0 )
500 GetTextExtent(wxGetWindowText((*m_radioButtons
)[i
]), &width
, &height
);
502 // adjust the size to take into account the radio box itself
503 // FIXME this is totally bogus!
510 width
= m_radioWidth
[i
];
511 height
= m_radioHeight
[i
];
514 if ( widthMax
< width
)
516 if ( heightMax
< height
)
520 return wxSize(widthMax
, heightMax
);
523 wxSize
wxRadioBox::GetTotalButtonSize(const wxSize
& sizeBtn
) const
525 // the radiobox should be big enough for its buttons
527 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, GetFont());
529 int extraHeight
= cy1
;
531 int height
= GetRowCount() * sizeBtn
.y
+ cy1
/2 + extraHeight
;
532 int width
= GetColumnCount() * (sizeBtn
.x
+ cx1
) + cx1
;
534 // Add extra space under the label, if it exists.
535 if (!wxControl::GetLabel().empty())
538 // and also wide enough for its label
540 GetTextExtent(GetLabelText(), &widthLabel
, NULL
);
541 widthLabel
+= RADIO_SIZE
; // FIXME this is bogus too
542 if ( widthLabel
> width
)
545 return wxSize(width
, height
);
548 wxSize
wxRadioBox::DoGetBestSize() const
550 if ( !m_radioButtons
)
552 // if we're not fully initialized yet, we can't meaningfully compute
553 // our best size, we'll do it later
557 wxSize best
= GetTotalButtonSize(GetMaxButtonSize());
562 // Restored old code.
563 void wxRadioBox::DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
565 int currentX
, currentY
;
566 GetPosition(¤tX
, ¤tY
);
567 int widthOld
, heightOld
;
568 GetSize(&widthOld
, &heightOld
);
573 if (x
== wxDefaultCoord
&& !(sizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
575 if (y
== wxDefaultCoord
&& !(sizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
582 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, GetFont());
584 // Attempt to have a look coherent with other platforms: We compute the
585 // biggest toggle dim, then we align all items according this value.
586 wxSize maxSize
= GetMaxButtonSize();
587 int maxWidth
= maxSize
.x
,
588 maxHeight
= maxSize
.y
;
590 wxSize totSize
= GetTotalButtonSize(maxSize
);
591 int totWidth
= totSize
.x
,
592 totHeight
= totSize
.y
;
594 // only change our width/height if asked for
595 if ( width
== wxDefaultCoord
)
597 if ( sizeFlags
& wxSIZE_AUTO_WIDTH
)
603 if ( height
== wxDefaultCoord
)
605 if ( sizeFlags
& wxSIZE_AUTO_HEIGHT
)
611 DoMoveWindow(xx
, yy
, width
, height
);
613 // Now position all the buttons: the current button will be put at
614 // wxPoint(x_offset, y_offset) and the new row/column will start at
615 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
616 // maxHeight) except for the buttons in the last column which should extend
617 // to the right border of radiobox and thus can be wider than this.
619 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
620 // left to right order and GetMajorDim() is the number of columns while
621 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
622 // GetMajorDim() is the number of rows.
627 // Add extra space under the label, if it exists.
628 if (!wxControl::GetLabel().empty())
631 int startX
= x_offset
;
632 int startY
= y_offset
;
634 const unsigned int count
= GetCount();
635 for (unsigned int i
= 0; i
< count
; i
++)
637 // the last button in the row may be wider than the other ones as the
638 // radiobox may be wider than the sum of the button widths (as it
639 // happens, for example, when the radiobox label is very long)
641 if ( m_windowStyle
& wxRA_SPECIFY_COLS
)
643 // item is the last in its row if it is a multiple of the number of
644 // columns or if it is just the last item
645 unsigned int n
= i
+ 1;
646 isLastInTheRow
= ((n
% GetMajorDim()) == 0) || (n
== count
);
648 else // wxRA_SPECIFY_ROWS
650 // item is the last in the row if it is in the last columns
651 isLastInTheRow
= i
>= (count
/GetMajorDim())*GetMajorDim();
654 // is this the start of new row/column?
655 if ( i
&& (i
% GetMajorDim() == 0) )
657 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
659 // start of new column
661 x_offset
+= maxWidth
+ cx1
;
663 else // start of new row
666 y_offset
+= maxHeight
;
667 if (m_radioWidth
[0]>0)
673 if ( isLastInTheRow
)
675 // make the button go to the end of radio box
676 widthBtn
= startX
+ width
- x_offset
- 2*cx1
;
677 if ( widthBtn
< maxWidth
)
682 // normal button, always of the same size
686 // make all buttons of the same, maximal size - like this they cover
687 // the radiobox entirely and the radiobox tooltips are always shown
688 // (otherwise they are not when the mouse pointer is in the radiobox
689 // part not belonging to any radiobutton)
690 DoMoveSibling((*m_radioButtons
)[i
], x_offset
, y_offset
, widthBtn
, maxHeight
);
692 // where do we put the next button?
693 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
696 y_offset
+= maxHeight
;
697 if (m_radioWidth
[0]>0)
702 // to the right of this one
703 x_offset
+= widthBtn
+ cx1
;
708 int wxRadioBox::GetItemFromPoint(const wxPoint
& pt
) const
710 const unsigned int count
= GetCount();
711 for ( unsigned int i
= 0; i
< count
; i
++ )
713 RECT rect
= wxGetWindowRect((*m_radioButtons
)[i
]);
715 if ( rect
.left
<= pt
.x
&& pt
.x
< rect
.right
&&
716 rect
.top
<= pt
.y
&& pt
.y
< rect
.bottom
)
725 // ----------------------------------------------------------------------------
727 // ----------------------------------------------------------------------------
731 WXHRGN
wxRadioBox::MSWGetRegionWithoutChildren()
734 ::GetWindowRect(GetHwnd(), &rc
);
735 HRGN hrgn
= ::CreateRectRgn(rc
.left
, rc
.top
, rc
.right
+ 1, rc
.bottom
+ 1);
737 const unsigned int count
= GetCount();
738 for ( unsigned int i
= 0; i
< count
; ++i
)
740 // don't clip out hidden children
741 if ( !IsItemShown(i
) )
744 ::GetWindowRect((*m_radioButtons
)[i
], &rc
);
745 AutoHRGN
hrgnchild(::CreateRectRgnIndirect(&rc
));
746 ::CombineRgn(hrgn
, hrgn
, hrgnchild
, RGN_DIFF
);
752 #endif // __WXWINCE__
754 // ---------------------------------------------------------------------------
755 // window proc for radio buttons
756 // ---------------------------------------------------------------------------
758 LRESULT APIENTRY _EXPORT
wxRadioBtnWndProc(HWND hwnd
,
766 // we must tell IsDialogMessage()/our kbd processing code that we
767 // want to process arrows ourselves because neither of them is
768 // smart enough to handle arrows properly for us
770 long lDlgCode
= ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
,
771 message
, wParam
, lParam
);
773 return lDlgCode
| DLGC_WANTARROWS
;
778 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
780 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
782 bool processed
= true;
806 // just to suppress the compiler warning
812 int selOld
= radiobox
->GetSelection();
813 int selNew
= radiobox
->GetNextItem
817 radiobox
->GetWindowStyle()
820 if ( selNew
!= selOld
)
822 radiobox
->SetSelection(selNew
);
823 radiobox
->SetFocus();
825 // emulate the button click
826 radiobox
->SendNotificationEvent();
837 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
839 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
841 // if we don't do this, no focus events are generated for the
842 // radiobox and, besides, we need to notify the parent about
843 // the focus change, otherwise the focus handling logic in
844 // wxControlContainer doesn't work
845 if ( message
== WM_SETFOCUS
)
846 radiobox
->HandleSetFocus((WXHWND
)wParam
);
848 radiobox
->HandleKillFocus((WXHWND
)wParam
);
855 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
857 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
859 bool processed
= false;
861 wxEvtHandler
* const handler
= radiobox
->GetEventHandler();
863 HELPINFO
* info
= (HELPINFO
*) lParam
;
864 if ( info
->iContextType
== HELPINFO_WINDOW
)
866 for ( wxWindow
* subjectOfHelp
= radiobox
;
868 subjectOfHelp
= subjectOfHelp
->GetParent() )
870 wxHelpEvent
helpEvent(wxEVT_HELP
,
871 subjectOfHelp
->GetId(),
872 wxPoint(info
->MousePos
.x
,
874 helpEvent
.SetEventObject(radiobox
);
875 if ( handler
->ProcessEvent(helpEvent
) )
882 else if (info
->iContextType
== HELPINFO_MENUITEM
)
884 wxHelpEvent
helpEvent(wxEVT_HELP
, info
->iCtrlId
);
885 helpEvent
.SetEventObject(radiobox
);
886 processed
= handler
->ProcessEvent(helpEvent
);
893 #endif // !__WXWINCE__
896 return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
, message
, wParam
, lParam
);
899 #endif // wxUSE_RADIOBOX