1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 // ---------------------------------------------------------------------------
21 #pragma implementation "radiobox.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
34 #include "wx/bitmap.h"
36 #include "wx/radiobox.h"
37 #include "wx/settings.h"
41 #include "wx/msw/private.h"
44 #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
47 #include "wx/tooltip.h"
48 #endif // wxUSE_TOOLTIPS
50 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
52 // there are two possible ways to create the radio buttons: either as children
53 // of the radiobox or as siblings of it - allow playing with both variants for
54 // now, eventually we will choose the best one for our purposes
56 // two main problems are the keyboard navigation inside the radiobox (arrows
57 // should switch between buttons, not pass focus to the next control) and the
58 // tooltips - a tooltip is associated with the radiobox itself, not the
61 // the problems with setting this to 1:
62 // a) Alt-<mnemonic of radiobox> isn't handled properly by IsDialogMessage()
63 // because it sets focus to the next control accepting it which is not a
64 // radio button but a radiobox sibling in this case - the only solution to
65 // this would be to handle Alt-<mnemonic> ourselves
66 // b) the problems with setting radiobox colours under Win98/2K were reported
67 // but I couldn't reproduce it so I have no idea about what causes it
69 // the problems with setting this to 0:
70 // a) the tooltips are not shown for the radiobox - possible solution: make
71 // TTM_WINDOWFROMPOS handling code in msw/tooltip.cpp work (easier said than
72 // done because I don't know why it doesn't work)
73 #define RADIOBTN_PARENT_IS_RADIOBOX 0
75 // ---------------------------------------------------------------------------
77 // ---------------------------------------------------------------------------
79 // wnd proc for radio buttons
81 LRESULT APIENTRY _EXPORT
wxRadioBtnWndProc(HWND hWnd
,
86 // ---------------------------------------------------------------------------
88 // ---------------------------------------------------------------------------
90 // the pointer to standard radio button wnd proc
91 static WXFARPROC s_wndprocRadioBtn
= (WXFARPROC
)NULL
;
95 // ===========================================================================
97 // ===========================================================================
99 // ---------------------------------------------------------------------------
101 // ---------------------------------------------------------------------------
103 int wxRadioBox::GetCount() const
108 int wxRadioBox::GetColumnCount() const
113 int wxRadioBox::GetRowCount() const
118 // returns the number of rows
119 int wxRadioBox::GetNumVer() const
121 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
127 return (m_noItems
+ m_majorDim
- 1)/m_majorDim
;
131 // returns the number of columns
132 int wxRadioBox::GetNumHor() const
134 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
136 return (m_noItems
+ m_majorDim
- 1)/m_majorDim
;
144 bool wxRadioBox::MSWCommand(WXUINT cmd
, WXWORD id
)
146 if ( cmd
== BN_CLICKED
)
151 int selectedButton
= -1;
153 for ( int i
= 0; i
< m_noItems
; i
++ )
155 if ( id
== wxGetWindowId(m_radioButtons
[i
]) )
163 if ( selectedButton
== -1 )
165 // just ignore it - due to a hack with WM_NCHITTEST handling in our
166 // wnd proc, we can receive dummy click messages when we click near
167 // the radiobox edge (this is ugly but Julian wouldn't let me get
172 if ( selectedButton
!= m_selectedButton
)
174 m_selectedButton
= selectedButton
;
176 SendNotificationEvent();
178 //else: don't generate events when the selection doesn't change
187 wxRadioBox::wxRadioBox()
189 m_selectedButton
= -1;
192 m_radioButtons
= NULL
;
195 m_radioHeight
= NULL
;
198 bool wxRadioBox::Create(wxWindow
*parent
,
200 const wxString
& title
,
204 const wxString choices
[],
207 const wxValidator
& val
,
208 const wxString
& name
)
210 // initialize members
211 m_selectedButton
= -1;
214 m_majorDim
= majorDim
== 0 ? n
: majorDim
;
215 m_noRowsOrCols
= majorDim
;
217 // common initialization
218 if ( !CreateControl(parent
, id
, pos
, size
, style
, val
, name
) )
221 // create the static box
222 if ( !MSWCreateControl(wxT("BUTTON"), BS_GROUPBOX
| WS_GROUP
,
223 pos
, size
, title
, 0) )
226 // and now create the buttons
228 #if RADIOBTN_PARENT_IS_RADIOBOX
229 HWND hwndParent
= GetHwnd();
231 HWND hwndParent
= GetHwndOf(parent
);
234 // Some radio boxes test consecutive id.
235 (void)NewControlId();
236 m_radioButtons
= new WXHWND
[n
];
237 m_radioWidth
= new int[n
];
238 m_radioHeight
= new int[n
];
241 wxFont
& font
= GetFont();
244 hfont
= font
.GetResourceHandle();
247 for ( int i
= 0; i
< n
; i
++ )
250 m_radioHeight
[i
] = -1;
251 long styleBtn
= BS_AUTORADIOBUTTON
| WS_TABSTOP
| WS_CHILD
| WS_VISIBLE
;
252 if ( i
== 0 && style
== 0 )
253 styleBtn
|= WS_GROUP
;
255 long newId
= NewControlId();
257 HWND hwndBtn
= ::CreateWindow(_T("BUTTON"),
260 0, 0, 0, 0, // will be set in SetSize()
268 wxLogLastError(wxT("CreateWindow(radio btn)"));
273 m_radioButtons
[i
] = (WXHWND
)hwndBtn
;
275 SubclassRadioButton((WXHWND
)hwndBtn
);
279 ::SendMessage(hwndBtn
, WM_SETFONT
, (WPARAM
)hfont
, 0L);
282 m_subControls
.Add(newId
);
285 // Create a dummy radio control to end the group.
286 (void)::CreateWindow(_T("BUTTON"),
288 WS_GROUP
| BS_AUTORADIOBUTTON
| WS_CHILD
,
289 0, 0, 0, 0, hwndParent
,
290 (HMENU
)NewControlId(), wxGetInstance(), NULL
);
294 SetSize(pos
.x
, pos
.y
, size
.x
, size
.y
);
299 wxRadioBox::~wxRadioBox()
301 m_isBeingDeleted
= TRUE
;
306 for (i
= 0; i
< m_noItems
; i
++)
307 ::DestroyWindow((HWND
)m_radioButtons
[i
]);
308 delete[] m_radioButtons
;
312 delete[] m_radioWidth
;
314 delete[] m_radioHeight
;
318 void wxRadioBox::SetString(int item
, const wxString
& label
)
320 wxCHECK_RET( item
>= 0 && item
< m_noItems
, wxT("invalid radiobox index") );
322 m_radioWidth
[item
] = m_radioHeight
[item
] = -1;
323 SetWindowText((HWND
)m_radioButtons
[item
], label
.c_str());
326 void wxRadioBox::SetSelection(int N
)
328 wxCHECK_RET( (N
>= 0) && (N
< m_noItems
), wxT("invalid radiobox index") );
330 // Following necessary for Win32s, because Win32s translate BM_SETCHECK
331 if (m_selectedButton
>= 0 && m_selectedButton
< m_noItems
)
332 ::SendMessage((HWND
) m_radioButtons
[m_selectedButton
], BM_SETCHECK
, 0, 0L);
334 ::SendMessage((HWND
)m_radioButtons
[N
], BM_SETCHECK
, 1, 0L);
335 ::SetFocus((HWND
)m_radioButtons
[N
]);
337 m_selectedButton
= N
;
340 // Get single selection, for single choice list items
341 int wxRadioBox::GetSelection() const
343 return m_selectedButton
;
346 // Find string for position
347 wxString
wxRadioBox::GetString(int item
) const
349 wxCHECK_MSG( item
>= 0 && item
< m_noItems
, wxEmptyString
,
350 wxT("invalid radiobox index") );
352 return wxGetWindowText(m_radioButtons
[item
]);
355 // ----------------------------------------------------------------------------
357 // ----------------------------------------------------------------------------
359 wxSize
wxRadioBox::GetMaxButtonSize() const
361 // calculate the max button size
364 for ( int i
= 0 ; i
< m_noItems
; i
++ )
367 if ( m_radioWidth
[i
] < 0 )
369 GetTextExtent(wxGetWindowText(m_radioButtons
[i
]), &width
, &height
);
371 // adjust the size to take into account the radio box itself
372 // FIXME this is totally bogus!
379 width
= m_radioWidth
[i
];
380 height
= m_radioHeight
[i
];
383 if ( widthMax
< width
)
385 if ( heightMax
< height
)
389 return wxSize(widthMax
, heightMax
);
392 wxSize
wxRadioBox::GetTotalButtonSize(const wxSize
& sizeBtn
) const
394 // the radiobox should be big enough for its buttons
396 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, &GetFont());
398 int extraHeight
= cy1
;
400 /* We'll assume the adjustments below are OK for Win 3.1 too
401 #if defined(CTL3D) && !CTL3D
402 // Requires a bigger group box in plain Windows
408 int height
= GetNumVer() * sizeBtn
.y
+ cy1
/2 + extraHeight
;
409 int width
= GetNumHor() * (sizeBtn
.x
+ cx1
) + cx1
;
411 // Add extra space under the label, if it exists.
412 if (!wxControl::GetLabel().IsEmpty())
415 // and also wide enough for its label
417 GetTextExtent(GetTitle(), &widthLabel
, NULL
);
418 widthLabel
+= RADIO_SIZE
; // FIXME this is bogus too
419 if ( widthLabel
> width
)
422 return wxSize(width
, height
);
425 wxSize
wxRadioBox::DoGetBestSize() const
427 return GetTotalButtonSize(GetMaxButtonSize());
430 // Restored old code.
431 void wxRadioBox::DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
433 int currentX
, currentY
;
434 GetPosition(¤tX
, ¤tY
);
435 int widthOld
, heightOld
;
436 GetSize(&widthOld
, &heightOld
);
441 if (x
== -1 && !(sizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
443 if (y
== -1 && !(sizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
446 #if RADIOBTN_PARENT_IS_RADIOBOX
455 wxGetCharSize(m_hWnd
, &cx1
, &cy1
, & GetFont());
457 // Attempt to have a look coherent with other platforms: We compute the
458 // biggest toggle dim, then we align all items according this value.
459 wxSize maxSize
= GetMaxButtonSize();
460 int maxWidth
= maxSize
.x
,
461 maxHeight
= maxSize
.y
;
463 wxSize totSize
= GetTotalButtonSize(maxSize
);
464 int totWidth
= totSize
.x
,
465 totHeight
= totSize
.y
;
467 // only change our width/height if asked for
470 if ( sizeFlags
& wxSIZE_AUTO_WIDTH
)
478 if ( sizeFlags
& wxSIZE_AUTO_HEIGHT
)
484 ::MoveWindow(GetHwnd(), xx
, yy
, width
, height
, TRUE
);
486 // Now position all the buttons: the current button will be put at
487 // wxPoint(x_offset, y_offset) and the new row/column will start at
488 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
489 // maxHeight) except for the buttons in the last column which should extend
490 // to the right border of radiobox and thus can be wider than this.
492 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
493 // left to right order and m_majorDim is the number of columns while
494 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
495 // m_majorDim is the number of rows.
500 // Add extra space under the label, if it exists.
501 if (!wxControl::GetLabel().IsEmpty())
504 int startX
= x_offset
;
505 int startY
= y_offset
;
507 for ( int i
= 0; i
< m_noItems
; i
++ )
509 // the last button in the row may be wider than the other ones as the
510 // radiobox may be wider than the sum of the button widths (as it
511 // happens, for example, when the radiobox label is very long)
513 if ( m_windowStyle
& wxRA_SPECIFY_COLS
)
515 // item is the last in its row if it is a multiple of the number of
516 // columns or if it is just the last item
518 isLastInTheRow
= ((n
% m_majorDim
) == 0) || (n
== m_noItems
);
520 else // wxRA_SPECIFY_ROWS
522 // item is the last in the row if it is in the last columns
523 isLastInTheRow
= i
>= (m_noItems
/m_majorDim
)*m_majorDim
;
526 // is this the start of new row/column?
527 if ( i
&& (i
% m_majorDim
== 0) )
529 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
531 // start of new column
533 x_offset
+= maxWidth
+ cx1
;
535 else // start of new row
538 y_offset
+= maxHeight
;
539 if (m_radioWidth
[0]>0)
545 if ( isLastInTheRow
)
547 // make the button go to the end of radio box
548 widthBtn
= startX
+ width
- x_offset
- 2*cx1
;
549 if ( widthBtn
< maxWidth
)
554 // normal button, always of the same size
558 // VZ: make all buttons of the same, maximal size - like this they
559 // cover the radiobox entirely and the radiobox tooltips are always
560 // shown (otherwise they are not when the mouse pointer is in the
561 // radiobox part not belonging to any radiobutton)
562 ::MoveWindow((HWND
)m_radioButtons
[i
],
563 x_offset
, y_offset
, widthBtn
, maxHeight
,
566 // where do we put the next button?
567 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
570 y_offset
+= maxHeight
;
571 if (m_radioWidth
[0]>0)
576 // to the right of this one
577 x_offset
+= widthBtn
+ cx1
;
582 void wxRadioBox::GetSize(int *width
, int *height
) const
585 rect
.left
= -1; rect
.right
= -1; rect
.top
= -1; rect
.bottom
= -1;
588 wxFindMaxSize(m_hWnd
, &rect
);
591 for (i
= 0; i
< m_noItems
; i
++)
592 wxFindMaxSize(m_radioButtons
[i
], &rect
);
594 *width
= rect
.right
- rect
.left
;
595 *height
= rect
.bottom
- rect
.top
;
598 void wxRadioBox::GetPosition(int *x
, int *y
) const
600 wxWindow
*parent
= GetParent();
601 RECT rect
= { -1, -1, -1, -1 };
604 for (i
= 0; i
< m_noItems
; i
++)
605 wxFindMaxSize(m_radioButtons
[i
], &rect
);
608 wxFindMaxSize(m_hWnd
, &rect
);
610 // Since we now have the absolute screen coords, if there's a parent we
611 // must subtract its top left corner
617 ::ScreenToClient((HWND
) parent
->GetHWND(), &point
);
620 // We may be faking the client origin. So a window that's really at (0, 30)
621 // may appear (to wxWin apps) to be at (0, 0).
624 wxPoint
pt(GetParent()->GetClientAreaOrigin());
633 void wxRadioBox::SetFocus()
637 if (m_selectedButton
== -1)
638 ::SetFocus((HWND
) m_radioButtons
[0]);
640 ::SetFocus((HWND
) m_radioButtons
[m_selectedButton
]);
645 bool wxRadioBox::Show(bool show
)
647 if ( !wxControl::Show(show
) )
650 int nCmdShow
= show
? SW_SHOW
: SW_HIDE
;
651 for ( int i
= 0; i
< m_noItems
; i
++ )
653 ::ShowWindow((HWND
)m_radioButtons
[i
], nCmdShow
);
659 // Enable a specific button
660 void wxRadioBox::Enable(int item
, bool enable
)
662 wxCHECK_RET( item
>= 0 && item
< m_noItems
,
663 wxT("invalid item in wxRadioBox::Enable()") );
665 ::EnableWindow((HWND
) m_radioButtons
[item
], enable
);
668 // Enable all controls
669 bool wxRadioBox::Enable(bool enable
)
671 if ( !wxControl::Enable(enable
) )
674 for (int i
= 0; i
< m_noItems
; i
++)
675 ::EnableWindow((HWND
) m_radioButtons
[i
], enable
);
680 // Show a specific button
681 void wxRadioBox::Show(int item
, bool show
)
683 wxCHECK_RET( item
>= 0 && item
< m_noItems
,
684 wxT("invalid item in wxRadioBox::Show()") );
686 ::ShowWindow((HWND
)m_radioButtons
[item
], show
? SW_SHOW
: SW_HIDE
);
689 bool wxRadioBox::ContainsHWND(WXHWND hWnd
) const
691 size_t count
= GetCount();
692 for ( size_t i
= 0; i
< count
; i
++ )
694 if ( GetRadioButtons()[i
] == hWnd
)
701 void wxRadioBox::Command(wxCommandEvent
& event
)
703 SetSelection (event
.m_commandInt
);
704 ProcessCommand (event
);
707 // NB: if this code is changed, wxGetWindowForHWND() which relies on having the
708 // radiobox pointer in GWL_USERDATA for radio buttons must be updated too!
709 void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn
)
711 // No GWL_USERDATA in Win16, so omit this subclassing.
713 HWND hwndBtn
= (HWND
)hWndBtn
;
715 if ( !s_wndprocRadioBtn
)
716 s_wndprocRadioBtn
= (WXFARPROC
)::GetWindowLong(hwndBtn
, GWL_WNDPROC
);
718 ::SetWindowLong(hwndBtn
, GWL_WNDPROC
, (long)wxRadioBtnWndProc
);
719 ::SetWindowLong(hwndBtn
, GWL_USERDATA
, (long)this);
723 void wxRadioBox::SendNotificationEvent()
725 wxCommandEvent
event(wxEVT_COMMAND_RADIOBOX_SELECTED
, m_windowId
);
726 event
.SetInt( m_selectedButton
);
727 event
.SetString( GetString(m_selectedButton
) );
728 event
.SetEventObject( this );
729 ProcessCommand(event
);
732 bool wxRadioBox::SetFont(const wxFont
& font
)
734 if ( !wxControl::SetFont(font
) )
740 // also set the font of our radio buttons
741 WXHFONT hfont
= wxFont(font
).GetResourceHandle();
742 for ( int n
= 0; n
< m_noItems
; n
++ )
744 HWND hwndBtn
= (HWND
)m_radioButtons
[n
];
745 ::SendMessage(hwndBtn
, WM_SETFONT
, (WPARAM
)hfont
, 0L);
747 // otherwise the buttons are not redrawn correctly
748 ::InvalidateRect(hwndBtn
, NULL
, FALSE
/* don't erase bg */);
754 // ----------------------------------------------------------------------------
756 // ----------------------------------------------------------------------------
758 long wxRadioBox::MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
)
763 case WM_CTLCOLORSTATIC
:
764 // set the colour of the radio buttons to be the same as ours
766 HDC hdc
= (HDC
)wParam
;
768 const wxColour
& colBack
= GetBackgroundColour();
769 ::SetBkColor(hdc
, wxColourToRGB(colBack
));
770 ::SetTextColor(hdc
, wxColourToRGB(GetForegroundColour()));
772 wxBrush
*brush
= wxTheBrushList
->FindOrCreateBrush(colBack
, wxSOLID
);
774 return (WXHBRUSH
)brush
->GetResourceHandle();
778 // VZ: this code breaks radiobox redrawing under Windows XP, don't use
779 // it. If you need to get messages from the static controls,
780 // create them as a child of another (non static) window
782 // This is required for the radiobox to be sensitive to mouse input,
783 // e.g. for Dialog Editor.
786 int xPos
= LOWORD(lParam
); // horizontal position of cursor
787 int yPos
= HIWORD(lParam
); // vertical position of cursor
789 ScreenToClient(&xPos
, &yPos
);
791 // Make sure you can drag by the top of the groupbox, but let
792 // other (enclosed) controls get mouse events also
794 return (long)HTCLIENT
;
800 return wxControl::MSWWindowProc(nMsg
, wParam
, lParam
);
803 WXHBRUSH
wxRadioBox::OnCtlColor(WXHDC pDC
, WXHWND
WXUNUSED(pWnd
), WXUINT
WXUNUSED(nCtlColor
),
809 WXUINT
WXUNUSED(message
),
810 WXWPARAM
WXUNUSED(wParam
),
811 WXLPARAM
WXUNUSED(lParam
)
818 HBRUSH hbrush
= Ctl3dCtlColorEx(message
, wParam
, lParam
);
819 return (WXHBRUSH
) hbrush
;
821 #endif // wxUSE_CTL3D
824 if (GetParent()->GetTransparentBackground())
825 SetBkMode(hdc
, TRANSPARENT
);
827 SetBkMode(hdc
, OPAQUE
);
829 wxColour colBack
= GetBackgroundColour();
832 colBack
= wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE
);
834 ::SetBkColor(hdc
, wxColourToRGB(colBack
));
835 ::SetTextColor(hdc
, wxColourToRGB(GetForegroundColour()));
837 wxBrush
*brush
= wxTheBrushList
->FindOrCreateBrush(colBack
, wxSOLID
);
839 return (WXHBRUSH
)brush
->GetResourceHandle();
843 // ---------------------------------------------------------------------------
844 // window proc for radio buttons
845 // ---------------------------------------------------------------------------
849 LRESULT APIENTRY _EXPORT
wxRadioBtnWndProc(HWND hwnd
,
857 // we must tell IsDialogMessage()/our kbd processing code that we
858 // want to process arrows ourselves because neither of them is
859 // smart enough to handle arrows properly for us
861 long lDlgCode
= ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
,
862 message
, wParam
, lParam
);
864 return lDlgCode
| DLGC_WANTARROWS
;
870 NMHDR
* hdr
= (NMHDR
*)lParam
;
871 if ( hdr
->code
== TTN_NEEDTEXT
)
873 wxRadioBox
*radiobox
= (wxRadioBox
*)
874 ::GetWindowLong(hwnd
, GWL_USERDATA
);
876 wxCHECK_MSG( radiobox
, 0,
877 wxT("radio button without radio box?") );
879 wxToolTip
*tooltip
= radiobox
->GetToolTip();
882 TOOLTIPTEXT
*ttt
= (TOOLTIPTEXT
*)lParam
;
883 ttt
->lpszText
= (wxChar
*)tooltip
->GetTip().c_str();
891 #endif // wxUSE_TOOLTIPS
895 wxRadioBox
*radiobox
= (wxRadioBox
*)
896 ::GetWindowLong(hwnd
, GWL_USERDATA
);
898 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
900 bool processed
= TRUE
;
924 // just to suppress the compiler warning
930 int selOld
= radiobox
->GetSelection();
931 int selNew
= radiobox
->GetNextItem
935 radiobox
->GetWindowStyle()
938 if ( selNew
!= selOld
)
940 radiobox
->SetSelection(selNew
);
942 // emulate the button click
943 radiobox
->SendNotificationEvent();
954 wxRadioBox
*radiobox
= (wxRadioBox
*)
955 ::GetWindowLong(hwnd
, GWL_USERDATA
);
957 wxCHECK_MSG( radiobox
, 0, wxT("radio button without radio box?") );
959 bool processed
= TRUE
;
961 HELPINFO
* info
= (HELPINFO
*) lParam
;
962 // Don't yet process menu help events, just windows
963 if (info
->iContextType
== HELPINFO_WINDOW
)
965 wxWindow
* subjectOfHelp
= radiobox
;
966 bool eventProcessed
= FALSE
;
967 while (subjectOfHelp
&& !eventProcessed
)
969 wxHelpEvent
helpEvent(wxEVT_HELP
, subjectOfHelp
->GetId(), wxPoint(info
->MousePos
.x
, info
->MousePos
.y
) ) ; // info->iCtrlId);
970 helpEvent
.SetEventObject(radiobox
);
971 eventProcessed
= radiobox
->GetEventHandler()->ProcessEvent(helpEvent
);
973 // Go up the window hierarchy until the event is handled (or not)
974 subjectOfHelp
= subjectOfHelp
->GetParent();
976 processed
= eventProcessed
;
978 else if (info
->iContextType
== HELPINFO_MENUITEM
)
980 wxHelpEvent
helpEvent(wxEVT_HELP
, info
->iCtrlId
) ;
981 helpEvent
.SetEventObject(radiobox
);
982 processed
= radiobox
->GetEventHandler()->ProcessEvent(helpEvent
);
984 else processed
= FALSE
;
994 return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn
, hwnd
, message
, wParam
, lParam
);
999 #endif // wxUSE_RADIOBOX