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
[]
266 , const wxValidator
& rVal
267 , const wxString
& rsName
273 vColour
.Set(wxString("BLACK"));
274 m_backgroundColour
= pParent
->GetBackgroundColour();
275 m_nSelectedButton
= -1;
278 m_nMajorDim
= nMajorDim
== 0 ? nNum
: nMajorDim
;
279 m_nNoRowsOrCols
= nMajorDim
;
282 // Common initialization
284 if (!CreateControl( pParent
293 if (!OS2CreateControl( "STATIC"
301 wxAssociateWinWithHandle(m_hWnd
, this);
302 #if RADIOBTN_PARENT_IS_RADIOBOX
303 HWND hWndParent
= GetHwnd();
305 HWND hWndParent
= GetHwndOf(pParent
);
310 // 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
];
318 for (int i
= 0; i
< nNum
; i
++)
320 m_pnRadioWidth
[i
] = m_pnRadioHeight
[i
] = -1;
322 long lStyleBtn
= BS_AUTORADIOBUTTON
| WS_TABSTOP
| WS_VISIBLE
;
323 int nNewId
= NewControlId();
325 if (i
== 0 && lStyle
== 0)
326 lStyleBtn
|= WS_GROUP
;
328 HWND hWndBtn
= (WXHWND
)::WinCreateWindow ( GetHwndOf(pParent
)
339 lColor
= (LONG
)vColour
.GetPixel();
340 ::WinSetPresParam( hWndBtn
345 lColor
= (LONG
)m_backgroundColour
.GetPixel();
347 ::WinSetPresParam( hWndBtn
356 m_ahRadioButtons
[i
] = (WXHWND
)hWndBtn
;
357 SubclassRadioButton((WXHWND
)hWndBtn
);
358 wxAssociateWinWithHandle(hWndBtn
, this);
359 wxOS2SetFont( hWndBtn
362 ::WinSetWindowULong(hWndBtn
, QWL_USER
, (ULONG
)this);
363 m_aSubControls
.Add(nNewId
);
367 // Create a dummy radio control to end the group.
369 (void)::WinCreateWindow ( GetHwndOf(pParent
)
372 ,WS_GROUP
| BS_AUTORADIOBUTTON
376 ,(HMENU
)NewControlId()
380 SetFont(*wxSMALL_FONT
);
381 fnWndProcRadioBox
= (WXFARPROC
)::WinSubclassWindow( GetHwnd()
382 ,(PFNWP
)wxRadioBoxWndProc
384 ::WinSetWindowULong(GetHwnd(), QWL_USER
, (ULONG
)this);
385 lColor
= (LONG
)vColour
.GetPixel();
386 ::WinSetPresParam( m_hWnd
391 ::WinSetPresParam( m_hWnd
396 lColor
= (LONG
)m_backgroundColour
.GetPixel();
398 ::WinSetPresParam( m_hWnd
403 ::WinSetPresParam( m_hWnd
417 } // end of wxRadioBox::Create
419 wxSize
wxRadioBox::DoGetBestSize() const
421 return (GetTotalButtonSize(GetMaxButtonSize()));
422 } // end of WinGuiBase_CRadioBox::DoGetBestSize
424 void wxRadioBox::DoSetSize(
438 #if RADIOBTN_PARENT_IS_RADIOBOX
447 wxSize vMaxSize
= GetMaxButtonSize();
456 m_nSizeFlags
= nSizeFlags
;
457 GetPosition( &nCurrentX
464 if (nX
== -1 && !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
466 if (nY
== -1 && !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
473 wxGetCharSize( m_hWnd
480 // Attempt to have a look coherent with other platforms: We compute the
481 // biggest toggle dim, then we align all items according this value.
483 vMaxSize
= GetMaxButtonSize();
484 nMaxWidth
= vMaxSize
.x
;
485 nMaxHeight
= vMaxSize
.y
;
487 vTotSize
= GetTotalButtonSize(vMaxSize
);
488 nTotWidth
= vTotSize
.x
;
489 nTotHeight
= vTotSize
.y
;
492 // Only change our width/height if asked for
496 if (nSizeFlags
& wxSIZE_AUTO_WIDTH
)
504 if (nSizeFlags
& wxSIZE_AUTO_HEIGHT
)
505 nHeight
= nTotHeight
;
507 nHeight
= nHeightOld
;
510 wxWindowOS2
* pParent
= (wxWindowOS2
*)GetParent();
514 int nOS2Height
= GetOS2ParentHeight(pParent
);
516 nYy
= nOS2Height
- (nYy
+ nHeight
);
517 nYOffset
= nYy
+ nHeight
;
523 ::WinQueryWindowRect(HWND_DESKTOP
, &vRect
);
524 nYy
= vRect
.yTop
- (nYy
+ nHeight
);
526 ::WinSetWindowPos( GetHwnd()
532 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
536 // Now position all the buttons: the current button will be put at
537 // wxPoint(x_offset, y_offset) and the new row/column will start at
538 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
539 // maxHeight) except for the buttons in the last column which should extend
540 // to the right border of radiobox and thus can be wider than this.
542 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
543 // left to right order and m_majorDim is the number of columns while
544 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
545 // m_majorDim is the number of rows.
548 nYOffset
-= (nMaxHeight
+ ((3*nCy1
)/2));
553 for (int i
= 0; i
< m_nNoItems
; i
++)
556 // The last button in the row may be wider than the other ones as the
557 // radiobox may be wider than the sum of the button widths (as it
558 // happens, for example, when the radiobox label is very long)
560 bool bIsLastInTheRow
;
562 if (m_windowStyle
& wxRA_SPECIFY_COLS
)
565 // Item is the last in its row if it is a multiple of the number of
566 // columns or if it is just the last item
570 bIsLastInTheRow
= ((n
% m_nMajorDim
) == 0) || (n
== m_nNoItems
);
572 else // winRA_SPECIFY_ROWS
575 // Item is the last in the row if it is in the last columns
577 bIsLastInTheRow
= i
>= (m_nNoItems
/m_nMajorDim
) * m_nMajorDim
;
581 // Is this the start of new row/column?
583 if (i
&& (i
% m_nMajorDim
== 0))
585 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
589 // Start of new column
592 nXOffset
+= nMaxWidth
+ nCx1
;
594 else // start of new row
597 nYOffset
-= nMaxHeight
;
598 if (m_pnRadioWidth
[0] > 0L)
608 // Make the button go to the end of radio box
610 nWidthBtn
= nStartX
+ nWidth
- nXOffset
- (2 * nCx1
);
611 if (nWidthBtn
< nMaxWidth
)
612 nWidthBtn
= nMaxWidth
;
617 // Normal button, always of the same size
619 nWidthBtn
= nMaxWidth
;
623 // Make all buttons of the same, maximal size - like this they
624 // cover the radiobox entirely and the radiobox tooltips are always
625 // shown (otherwise they are not when the mouse pointer is in the
626 // radiobox part not beinting to any radiobutton)
628 ::WinSetWindowPos( (HWND
)m_ahRadioButtons
[i
]
634 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
636 GetParent()->Refresh();
638 // Where do we put the next button?
640 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
645 nYOffset
-= nMaxHeight
;
646 if (m_pnRadioWidth
[0] > 0)
652 // To the right of this one
654 nXOffset
+= nWidthBtn
+ nCx1
;
657 } // end of wxRadioBox::DoSetSize
659 void wxRadioBox::Enable(
664 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
,
665 wxT("invalid item in wxRadioBox::Enable()") );
667 ::WinEnableWindow((HWND
) m_ahRadioButtons
[nItem
], bEnable
);
668 } // end of wxRadioBox::Enable
670 bool wxRadioBox::Enable(
674 if ( !wxControl::Enable(bEnable
) )
676 for (int i
= 0; i
< m_nNoItems
; i
++)
677 ::WinEnableWindow((HWND
)m_ahRadioButtons
[i
], bEnable
);
679 } // end of wxRadioBox::Enable
681 int wxRadioBox::FindString(
682 const wxString
& rsStr
685 for (int i
= 0; i
< m_nNoItems
; i
++)
687 if (rsStr
== wxGetWindowText(m_ahRadioButtons
[i
]) )
691 } // end of wxRadioBox::FindString
693 int wxRadioBox::GetColumnCount() const
696 } // end of wxRadioBox::GetColumnCount
698 int wxRadioBox::GetCount() const
701 } // end of wxRadioBox::GetCount
703 wxString
wxRadioBox::GetLabel(
707 wxCHECK_MSG(nItem
>= 0 && nItem
< m_nNoItems
, wxT(""), wxT("invalid radiobox index") );
709 return wxGetWindowText(m_ahRadioButtons
[nItem
]);
710 } // end of wxRadioBox::GetLabel
712 wxSize
wxRadioBox::GetMaxButtonSize() const
717 for (int i
= 0 ; i
< m_nNoItems
; i
++)
722 if (m_pnRadioWidth
[i
] < 0L)
724 GetTextExtent( wxGetWindowText(m_ahRadioButtons
[i
])
730 // Adjust the size to take into account the radio box itself
731 // FIXME this is totally bogus!
733 nWidth
+= RADIO_SIZE
;
739 nWidth
= m_pnRadioWidth
[i
];
740 nHeight
= m_pnRadioHeight
[i
];
742 if (nWidthMax
< nWidth
)
744 if (nHeightMax
< nHeight
)
745 nHeightMax
= nHeight
;
747 return(wxSize( nWidthMax
751 } // end of wxRadioBox::GetMaxButtonSize
753 int wxRadioBox::GetNumHor() const
755 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
757 return (m_nNoItems
+ m_nMajorDim
- 1)/m_nMajorDim
;
763 } // end of wxRadioBox::GetNumHor
765 int wxRadioBox::GetNumVer() const
767 if ( m_windowStyle
& wxRA_SPECIFY_ROWS
)
773 return (m_nNoItems
+ m_nMajorDim
- 1)/m_nMajorDim
;
775 } // end of wxRadioBox::GetNumVer
777 void wxRadioBox::GetPosition(
782 wxWindowOS2
* pParent
= GetParent();
783 RECT vRect
= { -1, -1, -1, -1 };;
787 for (i
= 0; i
< m_nNoItems
; i
++)
788 wxFindMaxSize( m_ahRadioButtons
[i
]
792 wxFindMaxSize( m_hWnd
797 // Since we now have the absolute screen coords, if there's a parent we
798 // must subtract its top left corner
800 vPoint
.x
= vRect
.xLeft
;
801 vPoint
.y
= vRect
.yTop
;
806 ::WinQueryWindowPos((HWND
)pParent
->GetHWND(), &vSwp
);
812 // We may be faking the client origin. So a window that's really at (0, 30)
813 // may appear (to wxWin apps) to be at (0, 0).
817 wxPoint
vPt(GetParent()->GetClientAreaOrigin());
824 } // end of wxRadioBox::GetPosition
826 int wxRadioBox::GetRowCount() const
829 } // end of wxRadioBox::GetRowCount
831 // Get single selection, for single choice list items
832 int wxRadioBox::GetSelection() const
834 return m_nSelectedButton
;
835 } // end of wxRadioBox::GetSelection
837 void wxRadioBox::GetSize(
851 wxFindMaxSize( m_hWnd
855 for (i
= 0; i
< m_nNoItems
; i
++)
856 wxFindMaxSize( m_ahRadioButtons
[i
]
860 *pnWidth
= vRect
.xRight
- vRect
.xLeft
;
861 *pnHeight
= vRect
.yBottom
- vRect
.yTop
;
862 } // end of wxRadioBox::GetSize
864 // Find string for position
865 wxString
wxRadioBox::GetString(
869 return wxGetWindowText(m_ahRadioButtons
[nNum
]);
870 } // end of wxRadioBox::GetString
872 // For single selection items only
873 wxString
wxRadioBox::GetStringSelection() const
876 int nSel
= GetSelection();
879 sResult
= GetString(nSel
);
881 } // end of wxRadioBox::GetStringSelection
883 wxSize
wxRadioBox::GetTotalButtonSize(
884 const wxSize
& rSizeBtn
894 wxGetCharSize( m_hWnd
901 nHeight
= GetNumVer() * rSizeBtn
.y
+ (2 * nCy1
);
902 nWidth
= GetNumHor() * (rSizeBtn
.x
+ nCx1
) + nCx1
;
905 // And also wide enough for its label
907 GetTextExtent( GetTitle()
911 nWidthLabel
+= RADIO_SIZE
;
912 if (nWidthLabel
> nWidth
)
913 nWidth
= nWidthLabel
;
915 return(wxSize( nWidth
919 } // end of wxRadioBox::GetTotalButtonSize
921 WXHBRUSH
wxRadioBox::OnCtlColor(
930 HPS hPS
= (HPS
)hwinDC
; // pass in a PS handle in OS/2
932 if (GetParent()->GetTransparentBackground())
933 ::GpiSetBackMix(hPS
, BM_LEAVEALONE
);
935 ::GpiSetBackMix(hPS
, BM_OVERPAINT
);
937 wxColour vColBack
= GetBackgroundColour();
939 ::GpiSetBackColor(hPS
, vColBack
.GetPixel());
940 ::GpiSetColor(hPS
, vColBack
.GetPixel());
943 wxBrush
* pBrush
= wxTheBrushList
->FindOrCreateBrush( vColBack
946 return ((WXHBRUSH
)pBrush
->GetResourceHandle());
947 } // end of wxRadioBox::OnCtlColor
949 bool wxRadioBox::OS2Command(
954 int nSelectedButton
= -1;
956 if (uCmd
== BN_CLICKED
)
962 for (int i
= 0; i
< m_nNoItems
; i
++)
964 if (wId
== wxGetWindowId(m_ahRadioButtons
[i
]))
970 if (nSelectedButton
== -1)
977 if (nSelectedButton
!= m_nSelectedButton
)
979 m_nSelectedButton
= nSelectedButton
;
980 SendNotificationEvent();
986 } // end of wxRadioBox::OS2Command
988 void wxRadioBox::SendNotificationEvent()
990 wxCommandEvent
vEvent( wxEVT_COMMAND_RADIOBOX_SELECTED
994 vEvent
.SetInt( m_nSelectedButton
);
995 vEvent
.SetString( GetString(m_nSelectedButton
) );
996 vEvent
.SetEventObject(this);
997 ProcessCommand(vEvent
);
998 } // end of wxRadioBox::SendNotificationEvent
1000 void wxRadioBox::SetFocus()
1004 if (m_nSelectedButton
== -1)
1005 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[0]);
1007 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[m_nSelectedButton
]);
1009 } // end of wxRadioBox::SetFocus
1011 bool wxRadioBox::SetFont(
1015 if (!wxControl::SetFont(rFont
))
1023 // Also set the font of our radio buttons
1025 WXHFONT hFont
= wxFont(rFont
).GetResourceHandle();
1027 for (int n
= 0; n
< (int)m_nNoItems
; n
++)
1029 HWND hWndBtn
= (HWND
)m_ahRadioButtons
[n
];
1031 wxOS2SetFont( hWndBtn
1034 ::WinInvalidateRect(hWndBtn
, NULL
, FALSE
);
1037 } // end of wxRadioBox::SetFont
1039 void wxRadioBox::SetSelection(
1043 wxCHECK_RET( (nNum
>= 0) && (nNum
< m_nNoItems
), wxT("invalid radiobox index") );
1045 if (m_nSelectedButton
>= 0 && m_nSelectedButton
< m_nNoItems
)
1046 ::WinSendMsg((HWND
)m_ahRadioButtons
[m_nSelectedButton
], BM_SETCHECK
, (MPARAM
)0, (MPARAM
)0);
1048 ::WinSendMsg((HWND
)m_ahRadioButtons
[nNum
], BM_SETCHECK
, (MPARAM
)1, (MPARAM
)0);
1049 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[nNum
]);
1050 m_nSelectedButton
= nNum
;
1051 } // end of wxRadioBox::SetSelection
1053 void wxRadioBox::SetString(
1055 , const wxString
& rsLabel
1058 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
, wxT("invalid radiobox index") );
1060 m_pnRadioWidth
[nItem
] = m_pnRadioHeight
[nItem
] = -1;
1061 ::WinSetWindowText((HWND
)m_ahRadioButtons
[nItem
], rsLabel
.c_str());
1062 } // end of wxRadioBox::SetString
1064 bool wxRadioBox::SetStringSelection(
1065 const wxString
& rsStr
1068 int nSel
= FindString(rsStr
);
1077 } // end of wxRadioBox::SetStringSelection
1079 bool wxRadioBox::Show(
1085 if (!wxControl::Show(bShow
))
1088 for (int i
= 0; i
< m_nNoItems
; i
++)
1090 ::WinShowWindow((HWND
)m_ahRadioButtons
[i
], (BOOL
)bShow
);
1093 } // end of wxRadioBox::Show
1095 // Show a specific button
1096 void wxRadioBox::Show(
1101 wxCHECK_RET( nItem
>= 0 && nItem
< m_nNoItems
,
1102 wxT("invalid item in wxRadioBox::Show()") );
1104 ::WinShowWindow((HWND
)m_ahRadioButtons
[nItem
], bShow
);
1105 } // end of wxRadioBox::Show
1107 void wxRadioBox::SubclassRadioButton(
1111 HWND hwndBtn
= (HWND
)hWndBtn
;
1113 fnWndProcRadioBtn
= (WXFARPROC
)::WinSubclassWindow(hWndBtn
, (PFNWP
)wxRadioBtnWndProc
);
1114 } // end of wxRadioBox::SubclassRadioButton
1116 MRESULT
wxRadioBox::WindowProc(
1122 return (wxControl::OS2WindowProc( uMsg
1126 } // end of wxRadioBox::WindowProc
1128 // ---------------------------------------------------------------------------
1129 // window proc for radio buttons
1130 // ---------------------------------------------------------------------------
1132 MRESULT
wxRadioBtnWndProc(
1143 USHORT uKeyFlags
= SHORT1FROMMP((MPARAM
)wParam
);
1145 if (!(uKeyFlags
& KC_KEYUP
)) // Key Down event
1147 if (uKeyFlags
& KC_VIRTUALKEY
)
1149 wxRadioBox
* pRadiobox
= (wxRadioBox
*)::WinQueryWindowULong( hWnd
1152 USHORT uVk
= SHORT2FROMMP((MPARAM
)lParam
);
1153 bool bProcessed
= TRUE
;
1178 // Just to suppress the compiler warning
1185 int nSelOld
= pRadiobox
->GetSelection();
1186 int nSelNew
= pRadiobox
->GetNextItem( nSelOld
1188 ,pRadiobox
->GetWindowStyleFlag()
1191 if (nSelNew
!= nSelOld
)
1193 pRadiobox
->SetSelection(nSelNew
);
1196 // Emulate the button click
1198 pRadiobox
->SendNotificationEvent();
1208 return fnWndProcRadioBtn( hWnd
1213 } // end of wxRadioBtnWndProc
1215 MRESULT EXPENTRY
wxRadioBoxWndProc(
1222 return (fnWndProcRadioBox( hWnd
1228 } // end of wxRadioBoxWndProc