mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
initial wxWidgets sample
This commit is contained in:
28
samples/CPlusPlusWidgets/main.cpp
Normal file
28
samples/CPlusPlusWidgets/main.cpp
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user