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
)wxUIntToPtr(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
)wxUIntToPtr(m_dummyId
.GetValue()),
214 wxGetInstance(), NULL
);
217 m_radioButtons
->SetFont(GetFont());
220 // Set the z-order correctly
221 SetWindowPos(GetHwnd(), HWND_BOTTOM
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
224 SetMajorDim(majorDim
== 0 ? n
: majorDim
, style
);
226 SetSize(pos
.x
, pos
.y
, size
.x
, size
.y
);
228 // Now that we have items determine what is the best size and set it.
229 SetInitialSize(size
);
234 bool wxRadioBox::Create(wxWindow
*parent
,
236 const wxString
& title
,
239 const wxArrayString
& choices
,
242 const wxValidator
& val
,
243 const wxString
& name
)
245 wxCArrayString
chs(choices
);
246 return Create(parent
, id
, title
, pos
, size
, chs
.GetCount(),
247 chs
.GetStrings(), majorDim
, style
, val
, name
);
250 wxRadioBox::~wxRadioBox()
252 m_isBeingDeleted
= true;
254 delete m_radioButtons
;
256 DestroyWindow((HWND
)m_dummyHwnd
);
257 delete[] m_radioWidth
;
258 delete[] m_radioHeight
;
261 // NB: if this code is changed, wxGetWindowForHWND() which relies on having the
262 // radiobox pointer in GWL_USERDATA for radio buttons must be updated too!
263 void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn
)
265 HWND hwndBtn
= (HWND
)hWndBtn
;
267 if ( !s_wndprocRadioBtn
)
268 s_wndprocRadioBtn
= (WXFARPROC
)wxGetWindowProc(hwndBtn
);
270 wxSetWindowProc(hwndBtn
, wxRadioBtnWndProc
);
271 wxSetWindowUserData(hwndBtn
, this);
274 // ----------------------------------------------------------------------------
276 // ----------------------------------------------------------------------------
278 bool wxRadioBox::MSWCommand(WXUINT cmd
, WXWORD id_
)
280 const int id
= (signed short)id_
;
282 if ( cmd
== BN_CLICKED
)
287 int selectedButton
= wxNOT_FOUND
;
289 const unsigned int count
= GetCount();
290 for ( unsigned int i
= 0; i
< count
; i
++ )
292 const HWND hwndBtn
= (*m_radioButtons
)[i
];
293 if ( id
== wxGetWindowId(hwndBtn
) )
295 // we can get BN_CLICKED for a button which just became focused
296 // but it may not be checked, in which case we shouldn't
297 // generate a radiobox selection changed event for it
298 if ( ::SendMessage(hwndBtn
, BM_GETCHECK
, 0, 0) == BST_CHECKED
)
305 if ( selectedButton
== wxNOT_FOUND
)
307 // just ignore it - due to a hack with WM_NCHITTEST handling in our
308 // wnd proc, we can receive dummy click messages when we click near
309 // the radiobox edge (this is ugly but Julian wouldn't let me get
314 if ( selectedButton
!= m_selectedButton
)
316 m_selectedButton
= selectedButton
;
318 SendNotificationEvent();
320 //else: don't generate events when the selection doesn't change
328 void wxRadioBox::Command(wxCommandEvent
& event
)
330 SetSelection (event
.GetInt());
332 ProcessCommand(event
);
335 void wxRadioBox::SendNotificationEvent()
337 wxCommandEvent
event(wxEVT_COMMAND_RADIOBOX_SELECTED
, m_windowId
);
338 event
.SetInt( m_selectedButton
);
339 event
.SetString(GetString(m_selectedButton
));
340 event
.SetEventObject( this );
341 ProcessCommand(event
);
344 // ----------------------------------------------------------------------------
346 // ----------------------------------------------------------------------------
348 unsigned int wxRadioBox::GetCount() const
350 return m_radioButtons
? m_radioButtons
->GetCount() : 0u;
353 void wxRadioBox::SetString(unsigned int item
, const wxString
& label
)
355 wxCHECK_RET( IsValid(item
), wxT("invalid radiobox index") );
358 m_radioHeight
[item
] = wxDefaultCoord
;
360 ::SetWindowText((*m_radioButtons
)[item
], label
.c_str());
362 InvalidateBestSize();
365 void wxRadioBox::SetSelection(int N
)
367 wxCHECK_RET( IsValid(N
), wxT("invalid radiobox index") );
369 // unselect the old button
370 if ( m_selectedButton
!= wxNOT_FOUND
)
371 ::SendMessage((*m_radioButtons
)[m_selectedButton
], BM_SETCHECK
, 0, 0L);
373 // and select the new one
374 ::SendMessage((*m_radioButtons
)[N
], BM_SETCHECK
, 1, 0L);
376 m_selectedButton
= N
;
379 // Find string for position
380 wxString
wxRadioBox::GetString(unsigned int item
) const
382 wxCHECK_MSG( IsValid(item
), wxEmptyString
,
383 wxT("invalid radiobox index") );
385 return wxGetWindowText((*m_radioButtons
)[item
]);
388 void wxRadioBox::SetFocus()
390 if ( GetCount() > 0 )
392 ::SetFocus((*m_radioButtons
)[m_selectedButton
== wxNOT_FOUND
394 : m_selectedButton
]);
398 // Enable a specific button
399 bool wxRadioBox::Enable(unsigned int item
, bool enable
)
401 wxCHECK_MSG( IsValid(item
), false,
402 wxT("invalid item in wxRadioBox::Enable()") );
404 BOOL ret
= ::EnableWindow((*m_radioButtons
)[item
], enable
);
406 return (ret
== 0) != enable
;
409 bool wxRadioBox::IsItemEnabled(unsigned int item
) const
411 wxCHECK_MSG( IsValid(item
), false,
412 wxT("invalid item in wxRadioBox::IsItemEnabled()") );
414 return ::IsWindowEnabled((*m_radioButtons
)[item
]) != 0;
417 // Show a specific button
418 bool wxRadioBox::Show(unsigned int item
, bool show
)
420 wxCHECK_MSG( IsValid(item
), false,
421 wxT("invalid item in wxRadioBox::Show()") );
423 BOOL ret
= ::ShowWindow((*m_radioButtons
)[item
], show
? SW_SHOW
: SW_HIDE
);
425 bool changed
= (ret
!= 0) != show
;
428 InvalidateBestSize();
434 bool wxRadioBox::IsItemShown(unsigned int item
) const
436 wxCHECK_MSG( IsValid(item
), false,
437 wxT("invalid item in wxRadioBox::IsItemShown()") );
439 // don't use IsWindowVisible() here because it would return false if the
440 // radiobox itself is hidden while we want to only return false if this
441 // button specifically is hidden
442 return (::GetWindowLong((*m_radioButtons
)[item
],
443 GWL_STYLE
) & WS_VISIBLE
) != 0;
448 bool wxRadioBox::HasToolTips() const
450 return wxStaticBox::HasToolTips() || wxRadioBoxBase::HasItemToolTips();
453 void wxRadioBox::DoSetItemToolTip(unsigned int item
, wxToolTip
*tooltip
)
455 // we have already checked for the item to be valid in wxRadioBoxBase
456 const HWND hwndRbtn
= (*m_radioButtons
)[item
];
457 if ( tooltip
!= NULL
)
458 tooltip
->Add(hwndRbtn
);
459 else // unset the tooltip
460 wxToolTip::Remove(hwndRbtn
);
463 #endif // wxUSE_TOOLTIPS
465 bool wxRadioBox::Reparent(wxWindowBase
*newParent
)
467 if ( !wxStaticBox::Reparent(newParent
) )
472 HWND hwndParent
= GetHwndOf(GetParent());
473 for ( size_t item
= 0; item
< m_radioButtons
->GetCount(); item
++ )
475 ::SetParent((*m_radioButtons
)[item
], hwndParent
);
478 // put static box under the buttons in the Z-order
479 SetWindowPos(GetHwnd(), HWND_BOTTOM
, 0, 0, 0, 0, SWP_NOMOVE
|SWP_NOSIZE
);
484 WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxRadioBox
, wxStaticBox
, m_radioButtons
)
486 // ----------------------------------------------------------------------------
488 // ----------------------------------------------------------------------------
490 wxSize
wxRadioBox::GetMaxButtonSize() const
492 // calculate the max button size
495 const unsigned int count
= GetCount();
496 for ( unsigned int i
= 0 ; i
< count
; i
++ )
499 if ( m_radioWidth
[i
] < 0 )
501 GetTextExtent(wxGetWindowText((*m_radioButtons
)[i
]), &width
, &height
);
503 // adjust the size to take into account the radio box itself
504 // FIXME this is totally bogus!
511 width
= m_radioWidth
[i
];
512 height
= m_radioHeight
[i
];
515 if ( widthMax
< width
)
517 if ( heightMax
< height
)
521 return wxSize(widthMax
, heightMax
);
524 wxSize
wxRadioBox::GetTotalButtonSize(const wxSize
& sizeBtn
) const
526 // the radiobox should be big enough for its buttons
528 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, GetFont());
530 int extraHeight
= cy1
;
532 int height
= GetRowCount() * sizeBtn
.y
+ cy1
/2 + extraHeight
;
533 int width
= GetColumnCount() * (sizeBtn
.x
+ cx1
) + cx1
;
535 // Add extra space under the label, if it exists.
536 if (!wxControl::GetLabel().empty())
539 // and also wide enough for its label
541 GetTextExtent(GetLabelText(), &widthLabel
, NULL
);
542 widthLabel
+= RADIO_SIZE
; // FIXME this is bogus too
543 if ( widthLabel
> width
)
546 return wxSize(width
, height
);
549 wxSize
wxRadioBox::DoGetBestSize() const
551 if ( !m_radioButtons
)
553 // if we're not fully initialized yet, we can't meaningfully compute
554 // our best size, we'll do it later
558 wxSize best
= GetTotalButtonSize(GetMaxButtonSize());
563 // Restored old code.
564 void wxRadioBox::DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
566 int currentX
, currentY
;
567 GetPosition(¤tX
, ¤tY
);
568 int widthOld
, heightOld
;
569 GetSize(&widthOld
, &heightOld
);
574 if (x
== wxDefaultCoord
&& !(sizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
576 if (y
== wxDefaultCoord
&& !(sizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
583 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, GetFont());
585 // Attempt to have a look coherent with other platforms: We compute the
586 // biggest toggle dim, then we align all items according this value.
587 wxSize maxSize
= GetMaxButtonSize();
588 int maxWidth
= maxSize
.x
,
589 maxHeight
= maxSize
.y
;
591 wxSize totSize
= GetTotalButtonSize(maxSize
);
592 int totWidth
= totSize
.x
,
593 totHeight
= totSize
.y
;
595 // only change our width/height if asked for
596 if ( width
== wxDefaultCoord
)
598 if ( sizeFlags
& wxSIZE_AUTO_WIDTH
)
604 if ( height
== wxDefaultCoord
)
606 if ( sizeFlags
& wxSIZE_AUTO_HEIGHT
)
612 DoMoveWindow(xx
, yy
, width
, height
);
614 // Now position all the buttons: the current button will be put at
615 // wxPoint(x_offset, y_offset) and the new row/column will start at
616 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
617 // maxHeight) except for the buttons in the last column which should extend
618 // to the right border of radiobox and thus can be wider than this.
620 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
621 // left to right order and GetMajorDim() is the number of columns while
622 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
623 // GetMajorDim() is the number of rows.
628 // Add extra space under the label, if it exists.
629 if (!wxControl::GetLabel().empty())
632 int startX
= x_offset
;
633 int startY
= y_offset
;
635 const unsigned int count
= GetCount();
636 for (unsigned int i
= 0; i
< count
; i
++)
638 // the last button in the row may be wider than the other ones as the
639 // radiobox may be wider than the sum of the button widths (as it
640 // happens, for example, when the radiobox label is very long)
642 if ( m_windowStyle
& wxRA_SPECIFY_COLS
)
644 // item is the last in its row if it is a multiple of the number of
645 // columns or if it is just the last item
646 unsigned int n
= i
+ 1;
647 isLastInTheRow
= ((n
% GetMajorDim()) == 0) || (n
== count
);
649 else // wxRA_SPECIFY_ROWS
651 // item is the last in the row if it is in the last columns
652 isLastInTheRow
= i
>= (count
/GetMajorDim())*GetMajorDim();
655 // is this the start of new row/column?
656 if ( i
&& (i
% GetMajorDim() == 0) )
658 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
660 // start of new column
662 x_offset
+= maxWidth
+ cx1
;
664 else // start of new row
667 y_offset
+= maxHeight
;
668 if (m_radioWidth
[0]>0)
674 if ( isLastInTheRow
)
676 // make the button go to the end of radio box
677 widthBtn
= startX
+ width
- x_offset
- 2*cx1
;
678 if ( widthBtn
< maxWidth
)
683 // normal button, always of the same size
687 // make all buttons of the same, maximal size - like this they cover
688 // the radiobox entirely and the radiobox tooltips are always shown
689 // (otherwise they are not when the mouse pointer is in the radiobox
690 // part not belonging to any radiobutton)
691 DoMoveSibling((*m_radioButtons
)[i
], x_offset
, y_offset
, widthBtn
, maxHeight
);
693 // where do we put the next button?
694 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
697 y_offset
+= maxHeight
;
698 if (m_radioWidth
[0]>0)
703 // to the right of this one
704 x_offset
+= widthBtn
+ cx1
;
709 int wxRadioBox::GetItemFromPoint(const wxPoint
& pt
) const
711 const unsigned int count
= GetCount();
712 for ( unsigned int i
= 0; i
< count
; i
++ )
714 RECT rect
= wxGetWindowRect((*m_radioButtons
)[i
]);
716 if ( rect
.left
<= pt
.x
&& pt
.x
< rect
.right
&&
717 rect
.top
<= pt
.y
&& pt
.y
< rect
.bottom
)
726 // ----------------------------------------------------------------------------
728 // ----------------------------------------------------------------------------
732 WXHRGN
wxRadioBox::MSWGetRegionWithoutChildren()
735 ::GetWindowRect(GetHwnd(), &rc
);
736 HRGN hrgn
= ::CreateRectRgn(rc
.left
, rc
.top
, rc
.right
+ 1, rc
.bottom
+ 1);
738 const unsigned int count
= GetCount();
739 for ( unsigned int i
= 0; i
< count
; ++i
)
741 // don't clip out hidden children
742 if ( !IsItemShown(i
) )
745 ::GetWindowRect((*m_radioButtons
)[i
], &rc
);
746 AutoHRGN
hrgnchild(::CreateRectRgnIndirect(&rc
));
747 ::CombineRgn(hrgn
, hrgn
, hrgnchild
, RGN_DIFF
);
753 #endif // __WXWINCE__
755 // ---------------------------------------------------------------------------
756 // window proc for radio buttons
757 // ---------------------------------------------------------------------------
759 LRESULT APIENTRY _EXPORT
wxRadioBtnWndProc(HWND hwnd
,
767 // we must tell IsDialogMessage()/our kbd processing code that we
768 // want to process arrows ourselves because neither of them is
769 // smart enough to handle arrows properly for us
771 long lDlgCode
= ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
,
772 message
, wParam
, lParam
);
774 return lDlgCode
| DLGC_WANTARROWS
;
779 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
781 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
783 bool processed
= true;
807 // just to suppress the compiler warning
813 int selOld
= radiobox
->GetSelection();
814 int selNew
= radiobox
->GetNextItem
818 radiobox
->GetWindowStyle()
821 if ( selNew
!= selOld
)
823 radiobox
->SetSelection(selNew
);
824 radiobox
->SetFocus();
826 // emulate the button click
827 radiobox
->SendNotificationEvent();
838 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
840 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
842 // if we don't do this, no focus events are generated for the
843 // radiobox and, besides, we need to notify the parent about
844 // the focus change, otherwise the focus handling logic in
845 // wxControlContainer doesn't work
846 if ( message
== WM_SETFOCUS
)
847 radiobox
->HandleSetFocus((WXHWND
)wParam
);
849 radiobox
->HandleKillFocus((WXHWND
)wParam
);
856 wxRadioBox
*radiobox
= (wxRadioBox
*)wxGetWindowUserData(hwnd
);
858 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
860 bool processed
= false;
862 wxEvtHandler
* const handler
= radiobox
->GetEventHandler();
864 HELPINFO
* info
= (HELPINFO
*) lParam
;
865 if ( info
->iContextType
== HELPINFO_WINDOW
)
867 for ( wxWindow
* subjectOfHelp
= radiobox
;
869 subjectOfHelp
= subjectOfHelp
->GetParent() )
871 wxHelpEvent
helpEvent(wxEVT_HELP
,
872 subjectOfHelp
->GetId(),
873 wxPoint(info
->MousePos
.x
,
875 helpEvent
.SetEventObject(radiobox
);
876 if ( handler
->ProcessEvent(helpEvent
) )
883 else if (info
->iContextType
== HELPINFO_MENUITEM
)
885 wxHelpEvent
helpEvent(wxEVT_HELP
, info
->iCtrlId
);
886 helpEvent
.SetEventObject(radiobox
);
887 processed
= handler
->ProcessEvent(helpEvent
);
894 #endif // !__WXWINCE__
897 return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
, message
, wParam
, lParam
);
900 #endif // wxUSE_RADIOBOX