X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c085e333984dc079a001cd3f581aeb1f51a1f227..4a33eba645f96bf7a89397d7dbadd7d62ee2fde1:/src/msw/radiobut.cpp?ds=sidebyside diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index a9957ebc05..32bd65e9b8 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -33,6 +33,18 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) #endif +bool wxRadioButton::MSWCommand(WXUINT param, WXWORD id) +{ + if (param == BN_CLICKED) + { + wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId); + event.SetEventObject( this ); + ProcessCommand(event); + return TRUE; + } + else return FALSE; +} + bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, @@ -72,8 +84,10 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, // Even with extended styles, need to combine with WS_BORDER // for them to look right. +/* if ( want3D || wxStyleHasBorder(m_windowStyle) ) msStyle |= WS_BORDER; +*/ m_hWnd = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, (const char *)label, msStyle,0,0,0,0, @@ -89,7 +103,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, } #endif - SetFont(* parent->GetFont()); + SetFont(parent->GetFont()); // Subclass again for purposes of dialog editing mode SubclassWin((WXHWND)m_hWnd); @@ -100,7 +114,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, if (label != "") { int label_width, label_height; - GetTextExtent(label, &label_width, &label_height, NULL, NULL, GetFont()); + GetTextExtent(label, &label_width, &label_height, NULL, NULL, & GetFont()); if (width < 0) width = (int)(label_width + RADIO_SIZE); if (height<0)