Files
velopack/samples/CPlusPlusWidgets/main.cpp
2024-11-15 22:30:36 +00:00

29 lines
633 B
C++

#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
}