X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd71308fc89eac2dd212b715eba68a993fa78f53..16553659df1a8fee8b19cc9a8ff8321711fe983c:/src/msw/checkbox.cpp?ds=sidebyside diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 32b1b32e2c..33452a6cdd 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -33,7 +33,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) bool wxCheckBox::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id)) { - wxCommandEvent event(wxEVENT_TYPE_CHECKBOX_COMMAND, m_windowId); + wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId); event.SetInt(GetValue()); event.SetEventObject(this); ProcessCommand(event); @@ -83,9 +83,10 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, // Even with extended styles, need to combine with WS_BORDER // for them to look right. - if (want3D && ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))) +/* + if ( want3D || wxStyleHasBorder(m_windowStyle) ) msStyle |= WS_BORDER; +*/ m_hWnd = (WXHWND)CreateWindowEx(exStyle, "BUTTON", Label, msStyle, @@ -104,7 +105,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, // Subclass again for purposes of dialog editing mode SubclassWin(m_hWnd); - SetFont(*parent->GetFont()); + SetFont(parent->GetFont()); SetSize(x, y, width, height); @@ -142,7 +143,7 @@ void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) if ( !str.IsEmpty() ) { - GetTextExtent(str, ¤t_width, &cyf, NULL, NULL, GetFont()); + GetTextExtent(str, ¤t_width, &cyf, NULL, NULL, & GetFont()); if (w1 < 0) w1 = (int)(current_width + RADIO_SIZE); if (h1 < 0)