1 /////////////////////////////////////////////////////////////////////////////
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
18 #include "wx/wxchar.h"
19 #include "wx/string.h"
20 #include "wx/bitmap.h"
22 #include "wx/radiobox.h"
25 #include "wx/os2/private.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
29 // ---------------------------------------------------------------------------
31 // ---------------------------------------------------------------------------
33 // wnd proc for radio buttons
34 MRESULT EXPENTRY
wxRadioBtnWndProc( HWND hWnd
40 // ---------------------------------------------------------------------------
42 // ---------------------------------------------------------------------------
44 // the pointer to standard radio button wnd proc
45 static WXFARPROC fnWndProcRadioBtn
= NULL
;
47 // ===========================================================================
49 // ===========================================================================
51 // ---------------------------------------------------------------------------
53 // ---------------------------------------------------------------------------
56 wxRadioBox::wxRadioBox()
58 m_nSelectedButton
= -1;
61 m_ahRadioButtons
= NULL
;
63 m_pnRadioWidth
= NULL
;
64 m_pnRadioHeight
= NULL
;
65 } // end of wxRadioBox::wxRadioBox
67 wxRadioBox::~wxRadioBox()
69 m_isBeingDeleted
= TRUE
;
74 for (i
= 0; i
< m_nNoItems
; i
++)
75 ::WinDestroyWindow((HWND
)m_ahRadioButtons
[i
]);
76 delete[] m_ahRadioButtons
;
79 delete[] m_pnRadioWidth
;
81 delete[] m_pnRadioHeight
;
82 } // end of wxRadioBox::~wxRadioBox
84 void wxRadioBox::AdjustButtons(
94 int nYOffset
= nY
+ nHeight
;
104 wxGetCharSize( m_hWnd
109 vMaxSize
= GetMaxButtonSize();
110 nMaxWidth
= vMaxSize
.x
;
111 nMaxHeight
= vMaxSize
.y
;
114 nYOffset
-= (nMaxHeight
+ ((3*nCy1
)/2));
119 for (int i
= 0; i
< m_nNoItems
; i
++)
122 // The last button in the row may be wider than the other ones as the
123 // radiobox may be wider than the sum of the button widths (as it
124 // happens, for example, when the radiobox label is very long)
126 bool bIsLastInTheRow
;
128 if (m_windowStyle
& wxRA_SPECIFY_COLS
)
131 // Item is the last in its row if it is a multiple of the number of
132 // columns or if it is just the last item
136 bIsLastInTheRow
= ((n
% m_nMajorDim
) == 0) || (n
== m_nNoItems
);
138 else // winRA_SPECIFY_ROWS
141 // Item is the last in the row if it is in the last columns
143 bIsLastInTheRow
= i
>= (m_nNoItems
/m_nMajorDim
) * m_nMajorDim
;
147 // Is this the start of new row/column?
149 if (i
&& (i
% m_nMajorDim
== 0))
151 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
155 // Start of new column
158 nXOffset
+= nMaxWidth
+ nCx1
;
160 else // start of new row
163 nYOffset
-= nMaxHeight
;
164 if (m_pnRadioWidth
[0] > 0L)
174 // Make the button go to the end of radio box
176 nWidthBtn
= nStartX
+ nWidth
- nXOffset
- (2 * nCx1
);
177 if (nWidthBtn
< nMaxWidth
)
178 nWidthBtn
= nMaxWidth
;
183 // Normal button, always of the same size
185 nWidthBtn
= nMaxWidth
;
189 // Make all buttons of the same, maximal size - like this they
190 // cover the radiobox entirely and the radiobox tooltips are always
191 // shown (otherwise they are not when the mouse pointer is in the
192 // radiobox part not beYInt32ing to any radiobutton)
194 ::WinSetWindowPos( (HWND
)m_ahRadioButtons
[i
]
200 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
203 // Where do we put the next button?
205 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
210 nYOffset
-= nMaxHeight
;
211 if (m_pnRadioWidth
[0] > 0)
217 // To the right of this one
219 nXOffset
+= nWidthBtn
+ nCx1
;
222 } // end of wxRadioBox::AdjustButtons
224 void wxRadioBox::Command (
225 wxCommandEvent
& rEvent
228 SetSelection (rEvent
.GetInt());
229 ProcessCommand(rEvent
);
230 } // end of wxRadioBox::Command
232 bool wxRadioBox::ContainsHWND(
236 size_t nCount
= GetCount();
239 for (i
= 0; i
< nCount
; i
++)
241 if (GetRadioButtons()[i
] == hWnd
)
245 } // end of wxRadioBox::ContainsHWND
247 bool wxRadioBox::Create(
250 , const wxString
& rsTitle
251 , const wxPoint
& rPos
252 , const wxSize
& rSize
254 , const wxString asChoices
[]
258 , const wxValidator
& rVal
260 , const wxString
& rsName
264 // System fonts are too big in OS/2 and they are blue
265 // We want smaller fonts and black by default.
267 wxFont
& rFont
= *wxSMALL_FONT
;
271 vColour
.Set(wxString("BLACK"));
272 lColor
= (LONG
)vColour
.GetPixel();
273 m_nSelectedButton
= -1;
276 m_nMajorDim
= nMajorDim
== 0 ? nNum
: nMajorDim
;
277 m_nNoRowsOrCols
= nMajorDim
;
280 // Common initialization
282 if (!OS2CreateControl( pParent
296 if (!OS2CreateControl( "STATIC"
297 ,SS_GROUPBOX
| WS_GROUP
303 #if RADIOBTN_PARENT_IS_RADIOBOX
304 HWND hWndParent
= GetHwnd();
306 HWND hWndParent
= GetHwndOf(pParent
);
311 // Some radio boxes test consecutive id.
313 (void)NewControlId();
314 m_ahRadioButtons
= new WXHWND
[nNum
];
315 m_pnRadioWidth
= new int[nNum
];
316 m_pnRadioHeight
= new int[nNum
];
320 hFont
= rFont
.GetResourceHandle();
323 for (int i
= 0; i
< nNum
; i
++)
325 m_pnRadioWidth
[i
] = m_pnRadioHeight
[i
] = -1;
327 long lStyleBtn
= BS_AUTORADIOBUTTON
| WS_TABSTOP
| WS_VISIBLE
;
328 int nNewId
= NewControlId();
330 if (i
== 0 && lStyle
== 0)
331 lStyleBtn
|= WS_GROUP
;
333 HWND hWndBtn
= (WXHWND
)::WinCreateWindow ( GetHwndOf(pParent
)
344 ::WinSetPresParam( hWndBtn
353 m_ahRadioButtons
[i
] = (WXHWND
)hWndBtn
;
354 SubclassRadioButton((WXHWND
)hWndBtn
);
355 wxOS2SetFont( hWndBtn
358 ::WinSetWindowULong(hWndBtn
, QWL_USER
, (ULONG
)this);
359 m_aSubControls
.Add(nNewId
);
363 // Create a dummy radio control to end the group.
365 (void)::WinCreateWindow ( GetHwndOf(pParent
)
368 ,WS_GROUP
| BS_AUTORADIOBUTTON
372 ,(HMENU
)NewControlId()
376 SetFont(*wxSMALL_FONT
);
377 ::WinSetPresParam( m_hWnd
389 } // end of wxRadioBox::Create
391 wxSize
wxRadioBox::DoGetBestSize() const
393 return (GetTotalButtonSize(GetMaxButtonSize()));
394 } // end of WinGuiBase_CRadioBox::DoGetBestSize
396 void wxRadioBox::DoSetSize(
410 #if RADIOBTN_PARENT_IS_RADIOBOX
419 wxSize vMaxSize
= GetMaxButtonSize();
428 m_nSizeFlags
= nSizeFlags
;
429 GetPosition( &nCurrentX
436 if (nX
== -1 && !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
438 if (nY
== -1 && !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
442 wxGetCharSize( m_hWnd
449 // Attempt to have a look coherent with other platforms: We compute the
450 // biggest toggle dim, then we align all items according this value.
452 vMaxSize
= GetMaxButtonSize();
453 nMaxWidth
= vMaxSize
.x
;
454 nMaxHeight
= vMaxSize
.y
;
456 vTotSize
= GetTotalButtonSize(vMaxSize
);
457 nTotWidth
= vTotSize
.x
;
458 nTotHeight
= vTotSize
.y
;
461 // Only change our width/height if asked for
465 if (nSizeFlags
& wxSIZE_AUTO_WIDTH
)
473 if (nSizeFlags
& wxSIZE_AUTO_HEIGHT
)
474 nHeight
= nTotHeight
;
476 nHeight
= nHeightOld
;
479 wxWindowOS2
* pParent
= (wxWindowOS2
*)GetParent();
483 nYy
= pParent
->GetClientSize().y
- (nYy
+ nHeight
);
484 nYOffset
= nYy
+ nHeight
;
490 ::WinQueryWindowRect(HWND_DESKTOP
, &vRect
);
491 nYy
= vRect
.yTop
- (nYy
+ nHeight
);
493 ::WinSetWindowPos( GetHwnd()
499 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
503 // Now position all the buttons: the current button will be put at
504 // wxPoint(x_offset, y_offset) and the new row/column will start at
505 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
506 // maxHeight) except for the buttons in the last column which should extend
507 // to the right border of radiobox and thus can be wider than this.
509 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
510 // left to right order and m_majorDim is the number of columns while
511 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
512 // m_majorDim is the number of rows.
515 nYOffset
-= (nMaxHeight
+ ((3*nCy1
)/2));
520 for (int i
= 0; i
< m_nNoItems
; i
++)
523 // The last button in the row may be wider than the other ones as the
524 // radiobox may be wider than the sum of the button widths (as it
525 // happens, for example, when the radiobox label is very long)
527 bool bIsLastInTheRow
;
529 if (m_windowStyle
& wxRA_SPECIFY_COLS
)
532 // Item is the last in its row if it is a multiple of the number of
533 // columns or if it is just the last item
537 bIsLastInTheRow
= ((n
% m_nMajorDim
) == 0) || (n
== m_nNoItems
);
539 else // winRA_SPECIFY_ROWS
542 // Item is the last in the row if it is in the last columns
544 bIsLastInTheRow
= i
>= (m_nNoItems
/m_nMajorDim
) * m_nMajorDim
;
548 // Is this the start of new row/column?
550 if (i
&& (i
% m_nMajorDim
== 0))
552 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
556 // Start of new column
559 nXOffset
+= nMaxWidth
+ nCx1
;
561 else // start of new row
564 nYOffset
-= nMaxHeight
;
565 if (m_pnRadioWidth
[0] > 0L)
575 // Make the button go to the end of radio box
577 nWidthBtn
= nStartX
+ nWidth
- nXOffset
- (2 * nCx1
);
578 if (nWidthBtn
< nMaxWidth
)
579 nWidthBtn
= nMaxWidth
;
584 // Normal button, always of the same size
586 nWidthBtn
= nMaxWidth
;
590 // Make all buttons of the same, maximal size - like this they
591 // cover the radiobox entirely and the radiobox tooltips are always
592 // shown (otherwise they are not when the mouse pointer is in the
593 // radiobox part not beinting to any radiobutton)
595 ::WinSetWindowPos( (HWND
)m_ahRadioButtons
[i
]
601 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
604 // Where do we put the next button?
606 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
611 nYOffset
-= nMaxHeight
;
612 if (m_pnRadioWidth
[0] > 0)
618 // To the right of this one
620 nXOffset
+= nWidthBtn
+ nCx1
;
623 } // end of wxRadioBox::DoSetSize
625 void wxRadioBox::Enable(
630 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
,
631 wxT("invalid item in wxRadioBox::Enable()") );
633 ::WinEnableWindow((HWND
) m_ahRadioButtons
[nItem
], bEnable
);
634 } // end of wxRadioBox::Enable
636 bool wxRadioBox::Enable(
640 if ( !wxControl::Enable(bEnable
) )
642 for (int i
= 0; i
< m_nNoItems
; i
++)
643 ::WinEnableWindow((HWND
)m_ahRadioButtons
[i
], bEnable
);
645 } // end of wxRadioBox::Enable
647 int wxRadioBox::FindString(
648 const wxString
& rsStr
651 for (int i
= 0; i
< m_nNoItems
; i
++)
653 if (rsStr
== wxGetWindowText(m_ahRadioButtons
[i
]) )
657 } // end of wxRadioBox::FindString
659 int wxRadioBox::GetColumnCount() const
662 } // end of wxRadioBox::GetColumnCount
664 int wxRadioBox::GetCount() const
667 } // end of wxRadioBox::GetCount
669 wxString
wxRadioBox::GetLabel(
673 wxCHECK_MSG(nItem
>= 0 && nItem
< m_nNoItems
, wxT(""), wxT("invalid radiobox index") );
675 return wxGetWindowText(m_ahRadioButtons
[nItem
]);
676 } // end of wxRadioBox::GetLabel
678 wxSize
wxRadioBox::GetMaxButtonSize() const
683 for (int i
= 0 ; i
< m_nNoItems
; i
++)
688 if (m_pnRadioWidth
[i
] < 0L)
690 GetTextExtent( wxGetWindowText(m_ahRadioButtons
[i
])
696 // Adjust the size to take into account the radio box itself
697 // FIXME this is totally bogus!
699 nWidth
+= RADIO_SIZE
;
705 nWidth
= m_pnRadioWidth
[i
];
706 nHeight
= m_pnRadioHeight
[i
];
708 if (nWidthMax
< nWidth
)
710 if (nHeightMax
< nHeight
)
711 nHeightMax
= nHeight
;
713 return(wxSize( nWidthMax
717 } // end of wxRadioBox::GetMaxButtonSize
719 int wxRadioBox::GetNumHor() const
721 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
723 return (m_nNoItems
+ m_nMajorDim
- 1)/m_nMajorDim
;
729 } // end of wxRadioBox::GetNumHor
731 int wxRadioBox::GetNumVer() const
733 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
739 return (m_nNoItems
+ m_nMajorDim
- 1)/m_nMajorDim
;
741 } // end of wxRadioBox::GetNumVer
743 void wxRadioBox::GetPosition(
748 wxWindowOS2
* pParent
= GetParent();
749 RECT vRect
= { -1, -1, -1, -1 };;
753 for (i
= 0; i
< m_nNoItems
; i
++)
754 wxFindMaxSize( m_ahRadioButtons
[i
]
758 wxFindMaxSize( m_hWnd
763 // Since we now have the absolute screen coords, if there's a parent we
764 // must subtract its top left corner
766 vPoint
.x
= vRect
.xLeft
;
767 vPoint
.y
= vRect
.yTop
;
772 ::WinQueryWindowPos((HWND
)pParent
->GetHWND(), &vSwp
);
778 // We may be faking the client origin. So a window that's really at (0, 30)
779 // may appear (to wxWin apps) to be at (0, 0).
783 wxPoint
vPt(GetParent()->GetClientAreaOrigin());
790 } // end of wxRadioBox::GetPosition
792 int wxRadioBox::GetRowCount() const
795 } // end of wxRadioBox::GetRowCount
797 // Get single selection, for single choice list items
798 int wxRadioBox::GetSelection() const
800 return m_nSelectedButton
;
801 } // end of wxRadioBox::GetSelection
803 void wxRadioBox::GetSize(
817 wxFindMaxSize( m_hWnd
821 for (i
= 0; i
< m_nNoItems
; i
++)
822 wxFindMaxSize( m_ahRadioButtons
[i
]
826 *pnWidth
= vRect
.xRight
- vRect
.xLeft
;
827 *pnHeight
= vRect
.yBottom
- vRect
.yTop
;
828 } // end of wxRadioBox::GetSize
830 // Find string for position
831 wxString
wxRadioBox::GetString(
835 return wxGetWindowText(m_ahRadioButtons
[nNum
]);
836 } // end of wxRadioBox::GetString
838 // For single selection items only
839 wxString
wxRadioBox::GetStringSelection() const
842 int nSel
= GetSelection();
845 sResult
= GetString(nSel
);
847 } // end of wxRadioBox::GetStringSelection
849 wxSize
wxRadioBox::GetTotalButtonSize(
850 const wxSize
& rSizeBtn
860 wxGetCharSize( m_hWnd
867 nHeight
= GetNumVer() * rSizeBtn
.y
+ (2 * nCy1
);
868 nWidth
= GetNumHor() * (rSizeBtn
.x
+ nCx1
) + nCx1
;
871 // And also wide enough for its label
873 GetTextExtent( GetTitle()
877 nWidthLabel
+= RADIO_SIZE
;
878 if (nWidthLabel
> nWidth
)
879 nWidth
= nWidthLabel
;
881 return(wxSize( nWidth
885 } // end of wxRadioBox::GetTotalButtonSize
887 WXHBRUSH
wxRadioBox::OnCtlColor(
896 HPS hPS
= (HPS
)hwinDC
; // pass in a PS handle in OS/2
898 if (GetParent()->GetTransparentBackground())
899 ::GpiSetBackMix(hPS
, BM_LEAVEALONE
);
901 ::GpiSetBackMix(hPS
, BM_OVERPAINT
);
903 wxColour vColBack
= GetBackgroundColour();
905 ::GpiSetBackColor(hPS
, vColBack
.GetPixel());
906 ::GpiSetColor(hPS
, vColBack
.GetPixel());
909 wxBrush
* pBrush
= wxTheBrushList
->FindOrCreateBrush( vColBack
912 return ((WXHBRUSH
)pBrush
->GetResourceHandle());
913 } // end of wxRadioBox::OnCtlColor
915 bool wxRadioBox::OS2Command(
920 int nSelectedButton
= -1;
922 if (uCmd
== BN_CLICKED
)
928 for (int i
= 0; i
< m_nNoItems
; i
++)
930 if (wId
== wxGetWindowId(m_ahRadioButtons
[i
]))
936 if (nSelectedButton
== -1)
939 // Just ignore it - due to a hack with WM_NCHITTEST handling in our
940 // wnd proc, we can receive dummy click messages when we click near
941 // the radiobox edge (this is ugly but Julian wouldn't let me get
945 if (nSelectedButton
!= m_nSelectedButton
)
947 m_nSelectedButton
= nSelectedButton
;
948 SendNotificationEvent();
954 } // end of wxRadioBox::OS2Command
956 void wxRadioBox::SendNotificationEvent()
958 wxCommandEvent
vEvent( wxEVT_COMMAND_RADIOBOX_SELECTED
962 vEvent
.SetInt( m_nSelectedButton
);
963 vEvent
.SetString( GetString(m_nSelectedButton
) );
964 vEvent
.SetEventObject(this);
965 ProcessCommand(vEvent
);
966 } // end of wxRadioBox::SendNotificationEvent
968 void wxRadioBox::SetFocus()
972 if (m_nSelectedButton
== -1)
973 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[0]);
975 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[m_nSelectedButton
]);
977 } // end of wxRadioBox::SetFocus
979 bool wxRadioBox::SetFont(
983 if (!wxControl::SetFont(rFont
))
991 // Also set the font of our radio buttons
993 WXHFONT hFont
= wxFont(rFont
).GetResourceHandle();
995 for (int n
= 0; n
< (int)m_nNoItems
; n
++)
997 HWND hWndBtn
= (HWND
)m_ahRadioButtons
[n
];
999 wxOS2SetFont( hWndBtn
1002 ::WinInvalidateRect(hWndBtn
, NULL
, FALSE
);
1005 } // end of wxRadioBox::SetFont
1007 void wxRadioBox::SetSelection(
1011 wxCHECK_RET( (nNum
>= 0) && (nNum
< m_nNoItems
), wxT("invalid radiobox index") );
1013 if (m_nSelectedButton
>= 0 && m_nSelectedButton
< m_nNoItems
)
1014 ::WinSendMsg((HWND
)m_ahRadioButtons
[m_nSelectedButton
], BM_SETCHECK
, (MPARAM
)0, (MPARAM
)0);
1016 ::WinSendMsg((HWND
)m_ahRadioButtons
[nNum
], BM_SETCHECK
, (MPARAM
)1, (MPARAM
)0);
1017 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[nNum
]);
1018 m_nSelectedButton
= nNum
;
1019 } // end of wxRadioBox::SetSelection
1021 void wxRadioBox::SetString(
1023 , const wxString
& rsLabel
1026 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
, wxT("invalid radiobox index") );
1028 m_pnRadioWidth
[nItem
] = m_pnRadioHeight
[nItem
] = -1;
1029 ::WinSetWindowText((HWND
)m_ahRadioButtons
[nItem
], rsLabel
.c_str());
1030 } // end of wxRadioBox::SetString
1032 bool wxRadioBox::SetStringSelection(
1033 const wxString
& rsStr
1036 int nSel
= FindString(rsStr
);
1045 } // end of wxRadioBox::SetStringSelection
1047 bool wxRadioBox::Show(
1053 if (!wxControl::Show(bShow
))
1056 for (int i
= 0; i
< m_nNoItems
; i
++)
1058 ::WinShowWindow((HWND
)m_ahRadioButtons
[i
], (BOOL
)bShow
);
1061 } // end of wxRadioBox::Show
1063 // Show a specific button
1064 void wxRadioBox::Show(
1069 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
,
1070 wxT("invalid item in wxRadioBox::Show()") );
1072 ::WinShowWindow((HWND
)m_ahRadioButtons
[nItem
], bShow
);
1073 } // end of wxRadioBox::Show
1075 void wxRadioBox::SubclassRadioButton(
1079 HWND hwndBtn
= (HWND
)hWndBtn
;
1081 fnWndProcRadioBtn
= (WXFARPROC
)::WinSubclassWindow(hWndBtn
, (PFNWP
)wxRadioBtnWndProc
);
1082 } // end of wxRadioBox::SubclassRadioButton
1084 MRESULT
wxRadioBox::WindowProc(
1090 return (wxControl::OS2WindowProc( uMsg
1094 } // end of wxRadioBox::WindowProc
1096 // ---------------------------------------------------------------------------
1097 // window proc for radio buttons
1098 // ---------------------------------------------------------------------------
1100 MRESULT
wxRadioBtnWndProc(
1111 USHORT uKeyFlags
= SHORT1FROMMP((MPARAM
)wParam
);
1113 if (!(uKeyFlags
& KC_KEYUP
)) // Key Down event
1115 if (uKeyFlags
& KC_VIRTUALKEY
)
1117 wxRadioBox
* pRadiobox
= (wxRadioBox
*)::WinQueryWindowULong( hWnd
1120 USHORT uVk
= SHORT2FROMMP((MPARAM
)lParam
);
1121 bool bProcessed
= TRUE
;
1146 // Just to suppress the compiler warning
1153 int nSelOld
= pRadiobox
->GetSelection();
1154 int nSelNew
= pRadiobox
->GetNextItem( nSelOld
1156 ,pRadiobox
->GetWindowStyleFlag()
1159 if (nSelNew
!= nSelOld
)
1161 pRadiobox
->SetSelection(nSelNew
);
1164 // Emulate the button click
1166 pRadiobox
->SendNotificationEvent();
1176 return fnWndProcRadioBtn( hWnd
1181 } // end of wxRadioBtnWndProc