I have added a check box to my basic window and have changed the font and font size accordingly,
however i am struggling to change the color, i have tried a number of different ways to do it, but
still no luck, can you show me an example of how to do it please, i will post my code below.
Code: Select all
#include "main.h"
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
wxInitAllImageHandlers();
wxFont font(wxFontInfo(14).FaceName("segoe ui semilight"));
mainframe = new wxFrame(NULL, wxID_ANY, wxString("wxProgen"), wxPoint(wxDefaultPosition), wxSize(458, 596), wxBORDER_SIMPLE);
sizer = new wxBoxSizer(wxHORIZONTAL);
optionbox = new wxCheckBox(mainframe, wxID_ANY, wxString("hello"), wxPoint(wxDefaultPosition), wxSize(90,20));
optionbox->SetFont(font);
sizer->Add(optionbox);
mainframe->SetSizerAndFit(sizer);
mainframe->SetBackgroundColour(wxColor(45, 45, 48));
mainframe->Center();
mainframe->Show();
return true;
}
Code: Select all
#include <wx/wx.h>
class MyApp : public wxApp
{
public:
virtual bool OnInit();
wxFrame *mainframe;
wxBoxSizer *sizer;
wxCheckBox *optionbox;
};
DECLARE_APP(MyApp)
im not really sure why.
tnx
msw server2012r2