wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxBEGIN_HANDLERS_TABLE(wxCheckBox)
wxEND_HANDLERS_TABLE()
-wxCONSTRUCTOR_6( wxCheckBox , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
+wxCONSTRUCTOR_6( wxCheckBox , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
#else
IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
#endif
event.SetEventObject(this);
ProcessCommand(event);
- return TRUE;
+ return true;
}
bool wxCheckBox::Create(wxWindow *parent,
const wxString& name)
{
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
- return FALSE;
+ return false;
long msStyle = WS_TABSTOP;
void wxCheckBox::SetValue(bool val)
{
- if (val)
- {
- Set3StateValue(wxCHK_CHECKED);
- }
- else
- {
- Set3StateValue(wxCHK_UNCHECKED);
- }
+ Set3StateValue(val ? wxCHK_CHECKED : wxCHK_UNCHECKED);
}
bool wxCheckBox::GetValue() const
{
- return (Get3StateValue() != 0);
+ return Get3StateValue() != wxCHK_UNCHECKED;
}
void wxCheckBox::Command(wxCommandEvent& event)
wxCheckBoxState wxCheckBox::DoGet3StateValue() const
{
-#ifdef __WIN32__
return (wxCheckBoxState) ::SendMessage(GetHwnd(), BM_GETCHECK, 0, 0);
-#else
- return (wxCheckBoxState) ((::SendMessage(GetHwnd(), BM_GETCHECK, 0, 0)
- & 0x001) == 0x001);
-#endif
-
}
#endif // wxUSE_CHECKBOX