Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "test.h"
- IMPLEMENT_APP(TestApp)
- bool TestApp::OnInit()
- {
- TestDialog *win=new TestDialog(NULL,wxID_ANY,wxT("Hello World!"),wxDefaultPosition,wxSize(236,88));
- win->Show(true);
- SetTopWindow(win);
- return true;
- }
- TestDialog::TestDialog(wxWindow *parent,wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,long style,const wxString& name) : wxDialog(parent,id,title,pos,size,style,name)
- {
- HelloWorld=new wxButton(this,HelloWorld_ID,wxT("Zmień tekst!"),wxPoint(10,10),wxSize(100,40));
- CloseWindow=new wxButton(this,CloseWindow_ID,wxT("Zamknij okno!"),wxPoint(120,10),wxSize(100,40));
- }
- void TestDialog::HelloWorld_Click(wxCommandEvent &event)
- {
- HelloWorld->SetLabel(wxT("Tekst zmieniony!"));
- }
- void TestDialog::CloseWindow_Click(wxCommandEvent &event)
- {
- wxMessageBox(wxT("Zamykam okno..."),wxT("Hello World!"));
- Close(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement