1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/os2/radiobox.cpp
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
;
71 m_pnRadioWidth
= NULL
;
72 m_pnRadioHeight
= NULL
;
73 } // end of wxRadioBox::wxRadioBox
75 wxRadioBox::~wxRadioBox()
77 m_isBeingDeleted
= true;
82 for (i
= 0; i
< m_nNoItems
; i
++)
83 ::WinDestroyWindow((HWND
)m_ahRadioButtons
[i
]);
84 delete[] m_ahRadioButtons
;
87 delete[] m_pnRadioWidth
;
89 delete[] m_pnRadioHeight
;
90 } // end of wxRadioBox::~wxRadioBox
92 void wxRadioBox::AdjustButtons( int nX
,
96 int WXUNUSED(nSizeFlags
) )
100 int nYOffset
= nY
+ nHeight
;
107 wxFont vFont
= GetFont();
109 wxGetCharSize( m_hWnd
114 vMaxSize
= GetMaxButtonSize();
115 nMaxWidth
= vMaxSize
.x
;
116 nMaxHeight
= vMaxSize
.y
;
119 nYOffset
-= (nMaxHeight
+ ((3*nCy1
)/2));
124 for (int i
= 0; i
< m_nNoItems
; i
++)
127 // The last button in the row may be wider than the other ones as the
128 // radiobox may be wider than the sum of the button widths (as it
129 // happens, for example, when the radiobox label is very long)
131 bool bIsLastInTheRow
;
133 if (m_windowStyle
& wxRA_SPECIFY_COLS
)
136 // Item is the last in its row if it is a multiple of the number of
137 // columns or if it is just the last item
141 bIsLastInTheRow
= ((n
% GetMajorDim()) == 0) || (n
== m_nNoItems
);
143 else // winRA_SPECIFY_ROWS
146 // Item is the last in the row if it is in the last columns
148 bIsLastInTheRow
= i
>= (m_nNoItems
/GetMajorDim()) * GetMajorDim();
152 // Is this the start of new row/column?
154 if (i
&& (i
% GetMajorDim() == 0))
156 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
160 // Start of new column
163 nXOffset
+= nMaxWidth
+ nCx1
;
165 else // start of new row
168 nYOffset
-= nMaxHeight
;
169 if (m_pnRadioWidth
[0] > 0L)
179 // Make the button go to the end of radio box
181 nWidthBtn
= nStartX
+ nWidth
- nXOffset
- (2 * nCx1
);
182 if (nWidthBtn
< nMaxWidth
)
183 nWidthBtn
= nMaxWidth
;
188 // Normal button, always of the same size
190 nWidthBtn
= nMaxWidth
;
194 // Make all buttons of the same, maximal size - like this they
195 // cover the radiobox entirely and the radiobox tooltips are always
196 // shown (otherwise they are not when the mouse pointer is in the
197 // radiobox part not beYInt32ing to any radiobutton)
199 ::WinSetWindowPos( (HWND
)m_ahRadioButtons
[i
]
205 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
208 // Where do we put the next button?
210 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
215 nYOffset
-= nMaxHeight
;
216 if (m_pnRadioWidth
[0] > 0)
222 // To the right of this one
224 nXOffset
+= nWidthBtn
+ nCx1
;
227 } // end of wxRadioBox::AdjustButtons
229 void wxRadioBox::Command (
230 wxCommandEvent
& rEvent
233 SetSelection (rEvent
.GetInt());
234 ProcessCommand(rEvent
);
235 } // end of wxRadioBox::Command
237 bool wxRadioBox::ContainsHWND(
241 size_t nCount
= GetCount();
244 for (i
= 0; i
< nCount
; i
++)
246 if (GetRadioButtons()[i
] == hWnd
)
250 } // end of wxRadioBox::ContainsHWND
252 bool wxRadioBox::Create(
255 , const wxString
& rsTitle
256 , const wxPoint
& rPos
257 , const wxSize
& rSize
258 , const wxArrayString
& asChoices
261 , const wxValidator
& rVal
262 , const wxString
& rsName
265 wxCArrayString
chs(asChoices
);
267 return Create(pParent
, vId
, rsTitle
, rPos
, rSize
, chs
.GetCount(),
268 chs
.GetStrings(), nMajorDim
, lStyle
, rVal
, rsName
);
271 bool wxRadioBox::Create(
274 , const wxString
& rsTitle
275 , const wxPoint
& rPos
276 , const wxSize
& rSize
278 , const wxString asChoices
[]
281 , const wxValidator
& rVal
282 , const wxString
& rsName
288 vColour
.Set(wxString(wxT("BLACK")));
289 m_backgroundColour
= pParent
->GetBackgroundColour();
290 m_nSelectedButton
= -1;
293 SetMajorDim(nMajorDim
== 0 ? nNum
: nMajorDim
, lStyle
);
294 m_nNoRowsOrCols
= nMajorDim
;
297 // Common initialization
299 if (!CreateControl( pParent
308 if (!OS2CreateControl( wxT("STATIC")
316 wxAssociateWinWithHandle(m_hWnd
, this);
319 // Some radio boxes test consecutive id.
322 (void)NewControlId();
323 m_ahRadioButtons
= new WXHWND
[nNum
];
324 m_pnRadioWidth
= new int[nNum
];
325 m_pnRadioHeight
= new int[nNum
];
327 for (int i
= 0; i
< nNum
; i
++)
329 m_pnRadioWidth
[i
] = m_pnRadioHeight
[i
] = -1;
331 long lStyleBtn
= BS_AUTORADIOBUTTON
| WS_TABSTOP
| WS_VISIBLE
;
332 int nNewId
= NewControlId();
334 if (i
== 0 && lStyle
== 0)
335 lStyleBtn
|= WS_GROUP
;
337 HWND hWndBtn
= (WXHWND
)::WinCreateWindow ( GetHwndOf(pParent
)
339 ,::wxPMTextToLabel(asChoices
[i
])
348 lColor
= (LONG
)vColour
.GetPixel();
349 ::WinSetPresParam( hWndBtn
354 lColor
= (LONG
)m_backgroundColour
.GetPixel();
356 ::WinSetPresParam( hWndBtn
365 m_ahRadioButtons
[i
] = (WXHWND
)hWndBtn
;
366 SubclassRadioButton((WXHWND
)hWndBtn
);
367 wxAssociateWinWithHandle(hWndBtn
, this);
368 wxOS2SetFont( hWndBtn
371 ::WinSetWindowULong(hWndBtn
, QWL_USER
, (ULONG
)this);
372 m_aSubControls
.Add(nNewId
);
376 // Create a dummy radio control to end the group.
378 (void)::WinCreateWindow ( GetHwndOf(pParent
),
381 WS_GROUP
| BS_AUTORADIOBUTTON
,
385 (HMENU
)NewControlId(),
389 SetFont(*wxSMALL_FONT
);
390 fnWndProcRadioBox
= (WXFARPROC
)::WinSubclassWindow( GetHwnd()
391 ,(PFNWP
)wxRadioBoxWndProc
393 ::WinSetWindowULong(GetHwnd(), QWL_USER
, (ULONG
)this);
394 lColor
= (LONG
)vColour
.GetPixel();
395 ::WinSetPresParam( m_hWnd
400 ::WinSetPresParam( m_hWnd
405 lColor
= (LONG
)m_backgroundColour
.GetPixel();
407 ::WinSetPresParam( m_hWnd
412 ::WinSetPresParam( m_hWnd
426 } // end of wxRadioBox::Create
428 wxSize
wxRadioBox::DoGetBestSize() const
430 return (GetTotalButtonSize(GetMaxButtonSize()));
431 } // end of WinGuiBase_CRadioBox::DoGetBestSize
433 void wxRadioBox::DoSetSize(
447 #if RADIOBTN_PARENT_IS_RADIOBOX
456 wxSize vMaxSize
= GetMaxButtonSize();
464 wxFont vFont
= GetFont();
466 m_nSizeFlags
= nSizeFlags
;
467 GetPosition( &nCurrentX
474 if (nX
== wxDefaultCoord
&& !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
476 if (nY
== wxDefaultCoord
&& !(nSizeFlags
& wxSIZE_ALLOW_MINUS_ONE
))
483 wxGetCharSize( m_hWnd
490 // Attempt to have a look coherent with other platforms: We compute the
491 // biggest toggle dim, then we align all items according this value.
493 vMaxSize
= GetMaxButtonSize();
494 nMaxWidth
= vMaxSize
.x
;
495 nMaxHeight
= vMaxSize
.y
;
497 vTotSize
= GetTotalButtonSize(vMaxSize
);
498 nTotWidth
= vTotSize
.x
;
499 nTotHeight
= vTotSize
.y
;
502 // Only change our width/height if asked for
506 if (nSizeFlags
& wxSIZE_AUTO_WIDTH
)
514 if (nSizeFlags
& wxSIZE_AUTO_HEIGHT
)
515 nHeight
= nTotHeight
;
517 nHeight
= nHeightOld
;
520 wxWindowOS2
* pParent
= (wxWindowOS2
*)GetParent();
524 int nOS2Height
= GetOS2ParentHeight(pParent
);
526 nYy
= nOS2Height
- (nYy
+ nHeight
);
527 nYOffset
= nYy
+ nHeight
;
533 ::WinQueryWindowRect(HWND_DESKTOP
, &vRect
);
534 nYy
= vRect
.yTop
- (nYy
+ nHeight
);
536 ::WinSetWindowPos( GetHwnd()
542 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
546 // Now position all the buttons: the current button will be put at
547 // wxPoint(x_offset, y_offset) and the new row/column will start at
548 // startX/startY. The size of all buttons will be the same wxSize(maxWidth,
549 // maxHeight) except for the buttons in the last column which should extend
550 // to the right border of radiobox and thus can be wider than this.
552 // Also, remember that wxRA_SPECIFY_COLS means that we arrange buttons in
553 // left to right order and m_majorDim is the number of columns while
554 // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
555 // m_majorDim is the number of rows.
558 nYOffset
-= (nMaxHeight
+ ((3*nCy1
)/2));
563 for (int i
= 0; i
< m_nNoItems
; i
++)
566 // The last button in the row may be wider than the other ones as the
567 // radiobox may be wider than the sum of the button widths (as it
568 // happens, for example, when the radiobox label is very long)
570 bool bIsLastInTheRow
;
572 if (m_windowStyle
& wxRA_SPECIFY_COLS
)
575 // Item is the last in its row if it is a multiple of the number of
576 // columns or if it is just the last item
580 bIsLastInTheRow
= ((n
% GetMajorDim()) == 0) || (n
== m_nNoItems
);
582 else // winRA_SPECIFY_ROWS
585 // Item is the last in the row if it is in the last columns
587 bIsLastInTheRow
= i
>= (m_nNoItems
/GetMajorDim()) * GetMajorDim();
591 // Is this the start of new row/column?
593 if (i
&& (i
% GetMajorDim() == 0))
595 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
599 // Start of new column
602 nXOffset
+= nMaxWidth
+ nCx1
;
604 else // start of new row
607 nYOffset
-= nMaxHeight
;
608 if (m_pnRadioWidth
[0] > 0L)
618 // Make the button go to the end of radio box
620 nWidthBtn
= nStartX
+ nWidth
- nXOffset
- (2 * nCx1
);
621 if (nWidthBtn
< nMaxWidth
)
622 nWidthBtn
= nMaxWidth
;
627 // Normal button, always of the same size
629 nWidthBtn
= nMaxWidth
;
633 // Make all buttons of the same, maximal size - like this they
634 // cover the radiobox entirely and the radiobox tooltips are always
635 // shown (otherwise they are not when the mouse pointer is in the
636 // radiobox part not beinting to any radiobutton)
638 ::WinSetWindowPos( (HWND
)m_ahRadioButtons
[i
]
644 ,SWP_ZORDER
| SWP_SIZE
| SWP_MOVE
| SWP_SHOW
647 // Where do we put the next button?
649 if (m_windowStyle
& wxRA_SPECIFY_ROWS
)
654 nYOffset
-= nMaxHeight
;
655 if (m_pnRadioWidth
[0] > 0)
661 // To the right of this one
663 nXOffset
+= nWidthBtn
+ nCx1
;
666 } // end of wxRadioBox::DoSetSize
668 bool wxRadioBox::Enable(int nItem
, bool bEnable
)
670 wxCHECK_MSG( IsValid(nItem
), false,
671 wxT("invalid item in wxRadioBox::Enable()") );
673 ::WinEnableWindow((HWND
) m_ahRadioButtons
[nItem
], bEnable
);
675 } // end of wxRadioBox::Enable
677 bool wxRadioBox::Enable(
681 if ( !wxControl::Enable(bEnable
) )
683 for (int i
= 0; i
< m_nNoItems
; i
++)
684 ::WinEnableWindow((HWND
)m_ahRadioButtons
[i
], bEnable
);
686 } // end of wxRadioBox::Enable
688 int wxRadioBox::GetCount() const
691 } // end of wxRadioBox::GetCount
693 wxString
wxRadioBox::GetLabel(int nItem
) const
695 wxCHECK_MSG( IsValid(nItem
), wxEmptyString
, wxT("invalid radiobox index") );
697 return wxGetWindowText(m_ahRadioButtons
[nItem
]);
698 } // end of wxRadioBox::GetLabel
700 wxSize
wxRadioBox::GetMaxButtonSize() const
705 for (int i
= 0 ; i
< m_nNoItems
; i
++)
710 if (m_pnRadioWidth
[i
] < 0L)
712 GetTextExtent( wxGetWindowText(m_ahRadioButtons
[i
])
718 // Adjust the size to take into account the radio box itself
719 // FIXME this is totally bogus!
721 nWidth
+= RADIO_SIZE
;
727 nWidth
= m_pnRadioWidth
[i
];
728 nHeight
= m_pnRadioHeight
[i
];
730 if (nWidthMax
< nWidth
)
732 if (nHeightMax
< nHeight
)
733 nHeightMax
= nHeight
;
735 wxSize
maxsize( nWidthMax
, nHeightMax
);
737 } // end of wxRadioBox::GetMaxButtonSize
739 void wxRadioBox::GetPosition( int* pnX
,
740 int* WXUNUSED(pnY
) ) const
742 wxWindowOS2
* pParent
= GetParent();
743 RECT vRect
= { -1, -1, -1, -1 };
747 for (i
= 0; i
< m_nNoItems
; i
++)
748 wxFindMaxSize( m_ahRadioButtons
[i
]
752 wxFindMaxSize( m_hWnd
757 // Since we now have the absolute screen coords, if there's a parent we
758 // must subtract its top left corner
760 vPoint
.x
= vRect
.xLeft
;
761 vPoint
.y
= vRect
.yTop
;
766 ::WinQueryWindowPos((HWND
)pParent
->GetHWND(), &vSwp
);
772 // We may be faking the client origin. So a window that's really at (0, 30)
773 // may appear (to wxWin apps) to be at (0, 0).
777 wxPoint
vPt(GetParent()->GetClientAreaOrigin());
784 } // end of wxRadioBox::GetPosition
786 // Get single selection, for single choice list items
787 int wxRadioBox::GetSelection() const
789 return m_nSelectedButton
;
790 } // end of wxRadioBox::GetSelection
792 void wxRadioBox::GetSize( int* pnWidth
, int* pnHeight
) const
803 wxFindMaxSize( m_hWnd
807 for (i
= 0; i
< m_nNoItems
; i
++)
808 wxFindMaxSize( m_ahRadioButtons
[i
]
813 *pnWidth
= vRect
.xRight
- vRect
.xLeft
;
815 *pnHeight
= vRect
.yTop
- vRect
.yBottom
;
816 } // end of wxRadioBox::GetSize
818 // Find string for position
819 wxString
wxRadioBox::GetString(
823 return wxGetWindowText(m_ahRadioButtons
[nNum
]);
824 } // end of wxRadioBox::GetString
826 // For single selection items only
827 wxString
wxRadioBox::GetStringSelection() const
830 int nSel
= GetSelection();
833 sResult
= GetString(nSel
);
835 } // end of wxRadioBox::GetStringSelection
837 wxSize
wxRadioBox::GetTotalButtonSize( const wxSize
& rSizeBtn
) const
845 nCx1
= GetCharWidth();
846 nCy1
= GetCharHeight();
847 nHeight
= GetRowCount() * rSizeBtn
.y
+ (2 * nCy1
);
848 nWidth
= GetColumnCount() * (rSizeBtn
.x
+ nCx1
) + nCx1
;
851 // And also wide enough for its label
853 wxString sStr
= wxGetWindowText(GetHwnd());
860 nWidthLabel
+= 2*nCx1
;
862 if (nWidthLabel
> nWidth
)
863 nWidth
= nWidthLabel
;
865 wxSize
total( nWidth
, nHeight
);
867 } // end of wxRadioBox::GetTotalButtonSize
869 WXHBRUSH
wxRadioBox::OnCtlColor( WXHDC hwinDC
,
870 WXHWND
WXUNUSED(hWnd
),
871 WXUINT
WXUNUSED(uCtlColor
),
872 WXUINT
WXUNUSED(uMessage
),
873 WXWPARAM
WXUNUSED(wParam
),
874 WXLPARAM
WXUNUSED(lParam
) )
876 HPS hPS
= (HPS
)hwinDC
; // pass in a PS handle in OS/2
878 if (GetParent()->GetTransparentBackground())
879 ::GpiSetBackMix(hPS
, BM_LEAVEALONE
);
881 ::GpiSetBackMix(hPS
, BM_OVERPAINT
);
883 wxColour vColBack
= GetBackgroundColour();
885 ::GpiSetBackColor(hPS
, vColBack
.GetPixel());
886 ::GpiSetColor(hPS
, vColBack
.GetPixel());
888 wxBrush
* pBrush
= wxTheBrushList
->FindOrCreateBrush( vColBack
, wxSOLID
);
889 return ((WXHBRUSH
)pBrush
->GetResourceHandle());
890 } // end of wxRadioBox::OnCtlColor
892 bool wxRadioBox::OS2Command( WXUINT uCmd
,
895 int nSelectedButton
= -1;
897 if (uCmd
== BN_CLICKED
)
903 for (int i
= 0; i
< m_nNoItems
; i
++)
905 if (wId
== wxGetWindowId(m_ahRadioButtons
[i
]))
911 if (nSelectedButton
== -1)
918 if (nSelectedButton
!= m_nSelectedButton
)
920 m_nSelectedButton
= nSelectedButton
;
921 SendNotificationEvent();
927 } // end of wxRadioBox::OS2Command
929 void wxRadioBox::SendNotificationEvent()
931 wxCommandEvent
vEvent( wxEVT_COMMAND_RADIOBOX_SELECTED
935 vEvent
.SetInt( m_nSelectedButton
);
936 vEvent
.SetString( GetString(m_nSelectedButton
) );
937 vEvent
.SetEventObject(this);
938 ProcessCommand(vEvent
);
939 } // end of wxRadioBox::SendNotificationEvent
941 void wxRadioBox::SetFocus()
945 if (m_nSelectedButton
== -1)
946 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[0]);
948 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[m_nSelectedButton
]);
950 } // end of wxRadioBox::SetFocus
952 bool wxRadioBox::SetFont(
956 if (!wxControl::SetFont(rFont
))
964 // Also set the font of our radio buttons
966 for (int n
= 0; n
< (int)m_nNoItems
; n
++)
968 HWND hWndBtn
= (HWND
)m_ahRadioButtons
[n
];
970 wxOS2SetFont( hWndBtn
973 ::WinInvalidateRect(hWndBtn
, NULL
, FALSE
);
976 } // end of wxRadioBox::SetFont
978 void wxRadioBox::SetSelection(
982 wxCHECK_RET( IsValid(nNum
), wxT("invalid radiobox index") );
984 if ( IsValid(m_nSelectedButton
) )
985 ::WinSendMsg((HWND
)m_ahRadioButtons
[m_nSelectedButton
], BM_SETCHECK
, (MPARAM
)0, (MPARAM
)0);
987 ::WinSendMsg((HWND
)m_ahRadioButtons
[nNum
], BM_SETCHECK
, (MPARAM
)1, (MPARAM
)0);
988 ::WinSetFocus(HWND_DESKTOP
, (HWND
)m_ahRadioButtons
[nNum
]);
989 m_nSelectedButton
= nNum
;
990 } // end of wxRadioBox::SetSelection
992 void wxRadioBox::SetString(
994 , const wxString
& rsLabel
997 wxCHECK_RET( IsValid(nItem
), wxT("invalid radiobox index") );
999 m_pnRadioWidth
[nItem
] = m_pnRadioHeight
[nItem
] = -1;
1000 ::WinSetWindowText((HWND
)m_ahRadioButtons
[nItem
], (PSZ
)rsLabel
.c_str());
1001 } // end of wxRadioBox::SetString
1003 bool wxRadioBox::SetStringSelection(const wxString
& rsStr
)
1005 int nSel
= FindString(rsStr
);
1014 } // end of wxRadioBox::SetStringSelection
1016 bool wxRadioBox::Show(
1020 if (!wxControl::Show(bShow
))
1023 for (int i
= 0; i
< m_nNoItems
; i
++)
1025 ::WinShowWindow((HWND
)m_ahRadioButtons
[i
], (BOOL
)bShow
);
1028 } // end of wxRadioBox::Show
1030 // Show a specific button
1031 bool wxRadioBox::Show(
1036 wxCHECK_MSG( IsValid(nItem
), false,
1037 wxT("invalid item in wxRadioBox::Show()") );
1039 ::WinShowWindow((HWND
)m_ahRadioButtons
[nItem
], bShow
);
1042 } // end of wxRadioBox::Show
1044 void wxRadioBox::SubclassRadioButton(
1048 fnWndProcRadioBtn
= (WXFARPROC
)::WinSubclassWindow(hWndBtn
, (PFNWP
)wxRadioBtnWndProc
);
1049 } // end of wxRadioBox::SubclassRadioButton
1051 MRESULT
wxRadioBox::WindowProc(
1057 return (wxControl::OS2WindowProc( uMsg
1061 } // end of wxRadioBox::WindowProc
1063 // ---------------------------------------------------------------------------
1064 // window proc for radio buttons
1065 // ---------------------------------------------------------------------------
1067 MRESULT
wxRadioBtnWndProc(
1078 USHORT uKeyFlags
= SHORT1FROMMP((MPARAM
)wParam
);
1080 if (!(uKeyFlags
& KC_KEYUP
)) // Key Down event
1082 if (uKeyFlags
& KC_VIRTUALKEY
)
1084 wxRadioBox
* pRadiobox
= (wxRadioBox
*)::WinQueryWindowULong( hWnd
1087 USHORT uVk
= SHORT2FROMMP((MPARAM
)lParam
);
1088 bool bProcessed
= true;
1113 // Just to suppress the compiler warning
1120 int nSelOld
= pRadiobox
->GetSelection();
1121 int nSelNew
= pRadiobox
->GetNextItem( nSelOld
1123 ,pRadiobox
->GetWindowStyleFlag()
1126 if (nSelNew
!= nSelOld
)
1128 pRadiobox
->SetSelection(nSelNew
);
1131 // Emulate the button click
1133 pRadiobox
->SendNotificationEvent();
1143 return fnWndProcRadioBtn( hWnd
1148 } // end of wxRadioBtnWndProc
1150 MRESULT EXPENTRY
wxRadioBoxWndProc( HWND hWnd
,
1155 return (fnWndProcRadioBox( hWnd
,
1160 } // end of wxRadioBoxWndProc