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
39 MRESULT EXPENTRY
wxRadioBoxWndProc( HWND hWnd
45 // ---------------------------------------------------------------------------
47 // ---------------------------------------------------------------------------
49 // the pointer to standard radio button wnd proc
50 extern void wxAssociateWinWithHandle( HWND hWnd
53 static WXFARPROC fnWndProcRadioBtn
= NULL
;
54 static WXFARPROC fnWndProcRadioBox
= NULL
;
56 // ===========================================================================
58 // ===========================================================================
60 // ---------------------------------------------------------------------------
62 // ---------------------------------------------------------------------------
65 wxRadioBox::wxRadioBox()
67 m_nSelectedButton
= -1;
70 m_ahRadioButtons
= NULL
;
72 m_pnRadioWidth
= NULL
;
73 m_pnRadioHeight
= NULL
;
74 } // end of wxRadioBox::wxRadioBox
76 wxRadioBox::~wxRadioBox()
78 m_isBeingDeleted
= TRUE
;
83 for (i
= 0; i
< m_nNoItems
; i
++)
84 ::WinDestroyWindow((HWND
)m_ahRadioButtons
[i
]);
85 delete[] m_ahRadioButtons
;
88 delete[] m_pnRadioWidth
;
90 delete[] m_pnRadioHeight
;
91 } // end of wxRadioBox::~wxRadioBox
93 void wxRadioBox::AdjustButtons(
103 int nYOffset
= nY
+ nHeight
;
113 wxGetCharSize( m_hWnd
118 vMaxSize
= GetMaxButtonSize();
119 nMaxWidth
= vMaxSize
.x
;
120 nMaxHeight
= vMaxSize
.y
;
123 nYOffset
-= (nMaxHeight
+ ((3*nCy1
)/2));
128 for (int i
= 0; i
< m_nNoItems
; i
++)
131 // The last button in the row may be wider than the other ones as the
132 // radiobox may be wider than the sum of the button widths (as it
133 // happens, for example, when the radiobox label is very long)
135 bool bIsLastInTheRow
;
137 if (m_windowStyle
& wxRA_SPECIFY_COLS
)
140 // Item is the last in its row if it is a multiple of the number of
141 // columns or if it is just the last item
145 bIsLastInTheRow
= ((n
% m_nMajorDim
) == 0) || (n
== m_nNoItems
);
147 else // winRA_SPECIFY_ROWS
150 // Item is the last in the row if it is in the last columns
152 bIsLastInTheRow
= i
>= (m_nNoItems
/m_nMajorDim
) * m_nMajorDim
;
156 // Is this the start of new row/column?
158 if (i
&& (i
% m_nMajorDim
== 0))
160 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
164 // Start of new column
167 nXOffset
+= nMaxWidth
+ nCx1
;
169 else // start of new row
172 nYOffset
-= nMaxHeight
;
173 if (m_pnRadioWidth
[0] > 0L)
183 // Make the button go to the end of radio box
185 nWidthBtn
= nStartX
+ nWidth
- nXOffset
- (2 * nCx1
);
186 if (nWidthBtn
< nMaxWidth
)
187 nWidthBtn
= nMaxWidth
;
192 // Normal button, always of the same size
194 nWidthBtn
= nMaxWidth
;
198 // Make all buttons of the same, maximal size - like this they
199 // cover the radiobox entirely and the radiobox tooltips are always
200 // shown (otherwise they are not when the mouse pointer is in the
201 // radiobox part not beYInt32ing to any radiobutton)
203 ::WinSetWindowPos( (HWND
)m_ahRadioButtons
[i
]
209 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
212 // Where do we put the next button?
214 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
219 nYOffset
-= nMaxHeight
;
220 if (m_pnRadioWidth
[0] > 0)
226 // To the right of this one
228 nXOffset
+= nWidthBtn
+ nCx1
;
231 } // end of wxRadioBox::AdjustButtons
233 void wxRadioBox::Command (
234 wxCommandEvent
& rEvent
237 SetSelection (rEvent
.GetInt());
238 ProcessCommand(rEvent
);
239 } // end of wxRadioBox::Command
241 bool wxRadioBox::ContainsHWND(
245 size_t nCount
= GetCount();
248 for (i
= 0; i
< nCount
; i
++)
250 if (GetRadioButtons()[i
] == hWnd
)
254 } // end of wxRadioBox::ContainsHWND
256 bool wxRadioBox::Create(
259 , const wxString
& rsTitle
260 , const wxPoint
& rPos
261 , const wxSize
& rSize
263 , const wxString asChoices
[]
267 , const wxValidator
& rVal
269 , const wxString
& rsName
275 vColour
.Set(wxString("BLACK"));
276 m_backgroundColour
= pParent
->GetBackgroundColour();
277 m_nSelectedButton
= -1;
280 m_nMajorDim
= nMajorDim
== 0 ? nNum
: nMajorDim
;
281 m_nNoRowsOrCols
= nMajorDim
;
284 // Common initialization
286 if (!CreateControl( pParent
297 if (!OS2CreateControl( "STATIC"
305 wxAssociateWinWithHandle(m_hWnd
, this);
306 #if RADIOBTN_PARENT_IS_RADIOBOX
307 HWND hWndParent
= GetHwnd();
309 HWND hWndParent
= GetHwndOf(pParent
);
314 // Some radio boxes test consecutive id.
317 (void)NewControlId();
318 m_ahRadioButtons
= new WXHWND
[nNum
];
319 m_pnRadioWidth
= new int[nNum
];
320 m_pnRadioHeight
= new int[nNum
];
322 for (int i
= 0; i
< nNum
; i
++)
324 m_pnRadioWidth
[i
] = m_pnRadioHeight
[i
] = -1;
326 long lStyleBtn
= BS_AUTORADIOBUTTON
| WS_TABSTOP
| WS_VISIBLE
;
327 int nNewId
= NewControlId();
329 if (i
== 0 && lStyle
== 0)
330 lStyleBtn
|= WS_GROUP
;
332 HWND hWndBtn
= (WXHWND
)::WinCreateWindow ( GetHwndOf(pParent
)
343 lColor
= (LONG
)vColour
.GetPixel();
344 ::WinSetPresParam( hWndBtn
349 lColor
= (LONG
)m_backgroundColour
.GetPixel();
351 ::WinSetPresParam( hWndBtn
360 m_ahRadioButtons
[i
] = (WXHWND
)hWndBtn
;
361 SubclassRadioButton((WXHWND
)hWndBtn
);
362 wxAssociateWinWithHandle(hWndBtn
, this);
363 wxOS2SetFont( hWndBtn
366 ::WinSetWindowULong(hWndBtn
, QWL_USER
, (ULONG
)this);
367 m_aSubControls
.Add(nNewId
);
371 // Create a dummy radio control to end the group.
373 (void)::WinCreateWindow ( GetHwndOf(pParent
)
376 ,WS_GROUP
| BS_AUTORADIOBUTTON
380 ,(HMENU
)NewControlId()
384 SetFont(*wxSMALL_FONT
);
385 fnWndProcRadioBox
= (WXFARPROC
)::WinSubclassWindow( GetHwnd()
386 ,(PFNWP
)wxRadioBoxWndProc
388 ::WinSetWindowULong(GetHwnd(), QWL_USER
, (ULONG
)this);
389 lColor
= (LONG
)vColour
.GetPixel();
390 ::WinSetPresParam( m_hWnd
395 ::WinSetPresParam( m_hWnd
400 lColor
= (LONG
)m_backgroundColour
.GetPixel();
402 ::WinSetPresParam( m_hWnd
407 ::WinSetPresParam( m_hWnd
421 } // end of wxRadioBox::Create
423 wxSize
wxRadioBox::DoGetBestSize() const
425 return (GetTotalButtonSize(GetMaxButtonSize()));
426 } // end of WinGuiBase_CRadioBox::DoGetBestSize
428 void wxRadioBox::DoSetSize(
442 #if RADIOBTN_PARENT_IS_RADIOBOX
451 wxSize vMaxSize
= GetMaxButtonSize();
460 m_nSizeFlags
= nSizeFlags
;
461 GetPosition( &nCurrentX
468 if (nX
== -1 && !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
470 if (nY
== -1 && !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
477 wxGetCharSize( m_hWnd
484 // Attempt to have a look coherent with other platforms: We compute the
485 // biggest toggle dim, then we align all items according this value.
487 vMaxSize
= GetMaxButtonSize();
488 nMaxWidth
= vMaxSize
.x
;
489 nMaxHeight
= vMaxSize
.y
;
491 vTotSize
= GetTotalButtonSize(vMaxSize
);
492 nTotWidth
= vTotSize
.x
;
493 nTotHeight
= vTotSize
.y
;
496 // Only change our width/height if asked for
500 if (nSizeFlags
& wxSIZE_AUTO_WIDTH
)
508 if (nSizeFlags
& wxSIZE_AUTO_HEIGHT
)
509 nHeight
= nTotHeight
;
511 nHeight
= nHeightOld
;
514 wxWindowOS2
* pParent
= (wxWindowOS2
*)GetParent();
518 int nOS2Height
= GetOS2ParentHeight(pParent
);
520 nYy
= nOS2Height
- (nYy
+ nHeight
);
521 nYOffset
= nYy
+ nHeight
;
527 ::WinQueryWindowRect(HWND_DESKTOP
, &vRect
);
528 nYy
= vRect
.yTop
- (nYy
+ nHeight
);
530 ::WinSetWindowPos( GetHwnd()
536 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
540 // Now position all the buttons: the current button will be put at
541 // wxPoint(x_offset, y_offset) and the new row/column will start at
542 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
543 // maxHeight) except for the buttons in the last column which should extend
544 // to the right border of radiobox and thus can be wider than this.
546 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
547 // left to right order and m_majorDim is the number of columns while
548 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
549 // m_majorDim is the number of rows.
552 nYOffset
-= (nMaxHeight
+ ((3*nCy1
)/2));
557 for (int i
= 0; i
< m_nNoItems
; i
++)
560 // The last button in the row may be wider than the other ones as the
561 // radiobox may be wider than the sum of the button widths (as it
562 // happens, for example, when the radiobox label is very long)
564 bool bIsLastInTheRow
;
566 if (m_windowStyle
& wxRA_SPECIFY_COLS
)
569 // Item is the last in its row if it is a multiple of the number of
570 // columns or if it is just the last item
574 bIsLastInTheRow
= ((n
% m_nMajorDim
) == 0) || (n
== m_nNoItems
);
576 else // winRA_SPECIFY_ROWS
579 // Item is the last in the row if it is in the last columns
581 bIsLastInTheRow
= i
>= (m_nNoItems
/m_nMajorDim
) * m_nMajorDim
;
585 // Is this the start of new row/column?
587 if (i
&& (i
% m_nMajorDim
== 0))
589 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
593 // Start of new column
596 nXOffset
+= nMaxWidth
+ nCx1
;
598 else // start of new row
601 nYOffset
-= nMaxHeight
;
602 if (m_pnRadioWidth
[0] > 0L)
612 // Make the button go to the end of radio box
614 nWidthBtn
= nStartX
+ nWidth
- nXOffset
- (2 * nCx1
);
615 if (nWidthBtn
< nMaxWidth
)
616 nWidthBtn
= nMaxWidth
;
621 // Normal button, always of the same size
623 nWidthBtn
= nMaxWidth
;
627 // Make all buttons of the same, maximal size - like this they
628 // cover the radiobox entirely and the radiobox tooltips are always
629 // shown (otherwise they are not when the mouse pointer is in the
630 // radiobox part not beinting to any radiobutton)
632 ::WinSetWindowPos( (HWND
)m_ahRadioButtons
[i
]
638 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
640 GetParent()->Refresh();
642 // Where do we put the next button?
644 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
649 nYOffset
-= nMaxHeight
;
650 if (m_pnRadioWidth
[0] > 0)
656 // To the right of this one
658 nXOffset
+= nWidthBtn
+ nCx1
;
661 } // end of wxRadioBox::DoSetSize
663 void wxRadioBox::Enable(
668 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
,
669 wxT("invalid item in wxRadioBox::Enable()") );
671 ::WinEnableWindow((HWND
) m_ahRadioButtons
[nItem
], bEnable
);
672 } // end of wxRadioBox::Enable
674 bool wxRadioBox::Enable(
678 if ( !wxControl::Enable(bEnable
) )
680 for (int i
= 0; i
< m_nNoItems
; i
++)
681 ::WinEnableWindow((HWND
)m_ahRadioButtons
[i
], bEnable
);
683 } // end of wxRadioBox::Enable
685 int wxRadioBox::FindString(
686 const wxString
& rsStr
689 for (int i
= 0; i
< m_nNoItems
; i
++)
691 if (rsStr
== wxGetWindowText(m_ahRadioButtons
[i
]) )
695 } // end of wxRadioBox::FindString
697 int wxRadioBox::GetColumnCount() const
700 } // end of wxRadioBox::GetColumnCount
702 int wxRadioBox::GetCount() const
705 } // end of wxRadioBox::GetCount
707 wxString
wxRadioBox::GetLabel(
711 wxCHECK_MSG(nItem
>= 0 && nItem
< m_nNoItems
, wxT(""), wxT("invalid radiobox index") );
713 return wxGetWindowText(m_ahRadioButtons
[nItem
]);
714 } // end of wxRadioBox::GetLabel
716 wxSize
wxRadioBox::GetMaxButtonSize() const
721 for (int i
= 0 ; i
< m_nNoItems
; i
++)
726 if (m_pnRadioWidth
[i
] < 0L)
728 GetTextExtent( wxGetWindowText(m_ahRadioButtons
[i
])
734 // Adjust the size to take into account the radio box itself
735 // FIXME this is totally bogus!
737 nWidth
+= RADIO_SIZE
;
743 nWidth
= m_pnRadioWidth
[i
];
744 nHeight
= m_pnRadioHeight
[i
];
746 if (nWidthMax
< nWidth
)
748 if (nHeightMax
< nHeight
)
749 nHeightMax
= nHeight
;
751 return(wxSize( nWidthMax
755 } // end of wxRadioBox::GetMaxButtonSize
757 int wxRadioBox::GetNumHor() const
759 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
761 return (m_nNoItems
+ m_nMajorDim
- 1)/m_nMajorDim
;
767 } // end of wxRadioBox::GetNumHor
769 int wxRadioBox::GetNumVer() const
771 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
777 return (m_nNoItems
+ m_nMajorDim
- 1)/m_nMajorDim
;
779 } // end of wxRadioBox::GetNumVer
781 void wxRadioBox::GetPosition(
786 wxWindowOS2
* pParent
= GetParent();
787 RECT vRect
= { -1, -1, -1, -1 };;
791 for (i
= 0; i
< m_nNoItems
; i
++)
792 wxFindMaxSize( m_ahRadioButtons
[i
]
796 wxFindMaxSize( m_hWnd
801 // Since we now have the absolute screen coords, if there's a parent we
802 // must subtract its top left corner
804 vPoint
.x
= vRect
.xLeft
;
805 vPoint
.y
= vRect
.yTop
;
810 ::WinQueryWindowPos((HWND
)pParent
->GetHWND(), &vSwp
);
816 // We may be faking the client origin. So a window that's really at (0, 30)
817 // may appear (to wxWin apps) to be at (0, 0).
821 wxPoint
vPt(GetParent()->GetClientAreaOrigin());
828 } // end of wxRadioBox::GetPosition
830 int wxRadioBox::GetRowCount() const
833 } // end of wxRadioBox::GetRowCount
835 // Get single selection, for single choice list items
836 int wxRadioBox::GetSelection() const
838 return m_nSelectedButton
;
839 } // end of wxRadioBox::GetSelection
841 void wxRadioBox::GetSize(
855 wxFindMaxSize( m_hWnd
859 for (i
= 0; i
< m_nNoItems
; i
++)
860 wxFindMaxSize( m_ahRadioButtons
[i
]
864 *pnWidth
= vRect
.xRight
- vRect
.xLeft
;
865 *pnHeight
= vRect
.yBottom
- vRect
.yTop
;
866 } // end of wxRadioBox::GetSize
868 // Find string for position
869 wxString
wxRadioBox::GetString(
873 return wxGetWindowText(m_ahRadioButtons
[nNum
]);
874 } // end of wxRadioBox::GetString
876 // For single selection items only
877 wxString
wxRadioBox::GetStringSelection() const
880 int nSel
= GetSelection();
883 sResult
= GetString(nSel
);
885 } // end of wxRadioBox::GetStringSelection
887 wxSize
wxRadioBox::GetTotalButtonSize(
888 const wxSize
& rSizeBtn
898 wxGetCharSize( m_hWnd
905 nHeight
= GetNumVer() * rSizeBtn
.y
+ (2 * nCy1
);
906 nWidth
= GetNumHor() * (rSizeBtn
.x
+ nCx1
) + nCx1
;
909 // And also wide enough for its label
911 GetTextExtent( GetTitle()
915 nWidthLabel
+= RADIO_SIZE
;
916 if (nWidthLabel
> nWidth
)
917 nWidth
= nWidthLabel
;
919 return(wxSize( nWidth
923 } // end of wxRadioBox::GetTotalButtonSize
925 WXHBRUSH
wxRadioBox::OnCtlColor(
934 HPS hPS
= (HPS
)hwinDC
; // pass in a PS handle in OS/2
936 if (GetParent()->GetTransparentBackground())
937 ::GpiSetBackMix(hPS
, BM_LEAVEALONE
);
939 ::GpiSetBackMix(hPS
, BM_OVERPAINT
);
941 wxColour vColBack
= GetBackgroundColour();
943 ::GpiSetBackColor(hPS
, vColBack
.GetPixel());
944 ::GpiSetColor(hPS
, vColBack
.GetPixel());
947 wxBrush
* pBrush
= wxTheBrushList
->FindOrCreateBrush( vColBack
950 return ((WXHBRUSH
)pBrush
->GetResourceHandle());
951 } // end of wxRadioBox::OnCtlColor
953 bool wxRadioBox::OS2Command(
958 int nSelectedButton
= -1;
960 if (uCmd
== BN_CLICKED
)
966 for (int i
= 0; i
< m_nNoItems
; i
++)
968 if (wId
== wxGetWindowId(m_ahRadioButtons
[i
]))
974 if (nSelectedButton
== -1)
981 if (nSelectedButton
!= m_nSelectedButton
)
983 m_nSelectedButton
= nSelectedButton
;
984 SendNotificationEvent();
990 } // end of wxRadioBox::OS2Command
992 void wxRadioBox::SendNotificationEvent()
994 wxCommandEvent
vEvent( wxEVT_COMMAND_RADIOBOX_SELECTED
998 vEvent
.SetInt( m_nSelectedButton
);
999 vEvent
.SetString( GetString(m_nSelectedButton
) );
1000 vEvent
.SetEventObject(this);
1001 ProcessCommand(vEvent
);
1002 } // end of wxRadioBox::SendNotificationEvent
1004 void wxRadioBox::SetFocus()
1008 if (m_nSelectedButton
== -1)
1009 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[0]);
1011 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[m_nSelectedButton
]);
1013 } // end of wxRadioBox::SetFocus
1015 bool wxRadioBox::SetFont(
1019 if (!wxControl::SetFont(rFont
))
1027 // Also set the font of our radio buttons
1029 WXHFONT hFont
= wxFont(rFont
).GetResourceHandle();
1031 for (int n
= 0; n
< (int)m_nNoItems
; n
++)
1033 HWND hWndBtn
= (HWND
)m_ahRadioButtons
[n
];
1035 wxOS2SetFont( hWndBtn
1038 ::WinInvalidateRect(hWndBtn
, NULL
, FALSE
);
1041 } // end of wxRadioBox::SetFont
1043 void wxRadioBox::SetSelection(
1047 wxCHECK_RET( (nNum
>= 0) && (nNum
< m_nNoItems
), wxT("invalid radiobox index") );
1049 if (m_nSelectedButton
>= 0 && m_nSelectedButton
< m_nNoItems
)
1050 ::WinSendMsg((HWND
)m_ahRadioButtons
[m_nSelectedButton
], BM_SETCHECK
, (MPARAM
)0, (MPARAM
)0);
1052 ::WinSendMsg((HWND
)m_ahRadioButtons
[nNum
], BM_SETCHECK
, (MPARAM
)1, (MPARAM
)0);
1053 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[nNum
]);
1054 m_nSelectedButton
= nNum
;
1055 } // end of wxRadioBox::SetSelection
1057 void wxRadioBox::SetString(
1059 , const wxString
& rsLabel
1062 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
, wxT("invalid radiobox index") );
1064 m_pnRadioWidth
[nItem
] = m_pnRadioHeight
[nItem
] = -1;
1065 ::WinSetWindowText((HWND
)m_ahRadioButtons
[nItem
], rsLabel
.c_str());
1066 } // end of wxRadioBox::SetString
1068 bool wxRadioBox::SetStringSelection(
1069 const wxString
& rsStr
1072 int nSel
= FindString(rsStr
);
1081 } // end of wxRadioBox::SetStringSelection
1083 bool wxRadioBox::Show(
1089 if (!wxControl::Show(bShow
))
1092 for (int i
= 0; i
< m_nNoItems
; i
++)
1094 ::WinShowWindow((HWND
)m_ahRadioButtons
[i
], (BOOL
)bShow
);
1097 } // end of wxRadioBox::Show
1099 // Show a specific button
1100 void wxRadioBox::Show(
1105 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
,
1106 wxT("invalid item in wxRadioBox::Show()") );
1108 ::WinShowWindow((HWND
)m_ahRadioButtons
[nItem
], bShow
);
1109 } // end of wxRadioBox::Show
1111 void wxRadioBox::SubclassRadioButton(
1115 HWND hwndBtn
= (HWND
)hWndBtn
;
1117 fnWndProcRadioBtn
= (WXFARPROC
)::WinSubclassWindow(hWndBtn
, (PFNWP
)wxRadioBtnWndProc
);
1118 } // end of wxRadioBox::SubclassRadioButton
1120 MRESULT
wxRadioBox::WindowProc(
1126 return (wxControl::OS2WindowProc( uMsg
1130 } // end of wxRadioBox::WindowProc
1132 // ---------------------------------------------------------------------------
1133 // window proc for radio buttons
1134 // ---------------------------------------------------------------------------
1136 MRESULT
wxRadioBtnWndProc(
1147 USHORT uKeyFlags
= SHORT1FROMMP((MPARAM
)wParam
);
1149 if (!(uKeyFlags
& KC_KEYUP
)) // Key Down event
1151 if (uKeyFlags
& KC_VIRTUALKEY
)
1153 wxRadioBox
* pRadiobox
= (wxRadioBox
*)::WinQueryWindowULong( hWnd
1156 USHORT uVk
= SHORT2FROMMP((MPARAM
)lParam
);
1157 bool bProcessed
= TRUE
;
1182 // Just to suppress the compiler warning
1189 int nSelOld
= pRadiobox
->GetSelection();
1190 int nSelNew
= pRadiobox
->GetNextItem( nSelOld
1192 ,pRadiobox
->GetWindowStyleFlag()
1195 if (nSelNew
!= nSelOld
)
1197 pRadiobox
->SetSelection(nSelNew
);
1200 // Emulate the button click
1202 pRadiobox
->SendNotificationEvent();
1212 return fnWndProcRadioBtn( hWnd
1217 } // end of wxRadioBtnWndProc
1219 MRESULT EXPENTRY
wxRadioBoxWndProc(
1226 return (fnWndProcRadioBox( hWnd
1232 } // end of wxRadioBoxWndProc