initial wxWidgets sample

This commit is contained in:
Caelan Sayler
2024-11-08 19:19:17 +00:00
committed by Caelan
parent e47a86bea3
commit 3b3eea72dc
4 changed files with 80 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#include <wx/wx.h>
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
class MyFrame : public wxFrame
{
public:
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
};
wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
MyFrame* frame = new MyFrame("Hello Everyone!", wxDefaultPosition, wxDefaultSize);
frame->Show(true);
return true;
}
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame(NULL, wxID_ANY, title, pos, size)
{
new wxStaticText(this, wxID_ANY, "Good Morning!"); // no need to delete - the parent will do it automatically
}