IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
-bool wxRadioButton::MSWCommand(WXUINT param, WXWORD id)
+bool wxRadioButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
{
if (param == BN_CLICKED)
{
wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId);
event.SetEventObject( this );
+ event.SetInt( GetValue() );
ProcessCommand(event);
return TRUE;
}
SetSize(x, y, width, height);
+ // for compatibility with wxGTK, the first radio button in a group is
+ // always checked (this makes sense anyhow as you need to ensure that at
+ // least one button in the group is checked and this is the simlpest way to
+ // do it)
+ if ( m_windowStyle & wxRB_GROUP )
+ SetValue(TRUE);
+
return TRUE;
}
ProcessCommand (event);
}
-WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
- WXUINT message,
- WXWPARAM wParam,
- WXLPARAM lParam)
+WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
+ WXUINT WXUNUSED(message),
+ WXWPARAM WXUNUSED(wParam),
+ WXLPARAM WXUNUSED(lParam))
{
#if wxUSE_CTL3D
if ( m_useCtl3D )