]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/radiobox.cpp
fixed stub code compilation (don't use PSYMBOL_INFO)
[wxWidgets.git] / src / msw / radiobox.cpp
index c6e913c1c271ca3de23dbb11ebbf0e6e83c47898..6e928f08ad8d29af4b6f77c317f1e9b3b9dc733e 100644 (file)
@@ -315,7 +315,7 @@ bool wxRadioBox::MSWCommand(WXUINT cmd, WXWORD id)
 
 void wxRadioBox::Command(wxCommandEvent & event)
 {
-    SetSelection (event.m_commandInt);
+    SetSelection (event.GetInt());
     SetFocus();
     ProcessCommand(event);
 }
@@ -378,6 +378,11 @@ void wxRadioBox::SetSelection(int N)
 {
     wxCHECK_RET( (N >= 0) && (N < GetCount()), wxT("invalid radiobox index") );
 
+    // unselect the old button
+    if ( m_selectedButton != wxNOT_FOUND )
+        ::SendMessage((*m_radioButtons)[m_selectedButton], BM_SETCHECK, 0, 0L);
+
+    // and select the new one
     ::SendMessage((*m_radioButtons)[N], BM_SETCHECK, 1, 0L);
 
     m_selectedButton = N;