Example #1
0
bool MyApp::OnInit() {
	MyFrame* frame = new MyFrame(wxT("Min wxWidgets app"));
	frame->Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnQuit));
	frame->Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnAbout));
	
	frame->Show(true);
	return true; // event handling loop starts after
}
Example #2
0
bool MyApp::OnInit()
{
	MyFrame *frame = new MyFrame(_T("TinyBot"), wxPoint(50,50),
                wxSize(450,350));

	frame->Connect( ID_Quit, wxEVT_COMMAND_MENU_SELECTED,
		(wxObjectEventFunction) &MyFrame::OnQuit );
	frame->Connect( ID_About, wxEVT_COMMAND_MENU_SELECTED,
		(wxObjectEventFunction) &MyFrame::OnAbout );

	frame->Show(TRUE);
	SetTopWindow(frame);
	return TRUE;
}
Example #3
0
bool MyApp::OnInit()
{
	MyFrame *frame = new MyFrame(_("Program Line Counter"), wxPoint(50, 50),
		wxSize(600, 350));

	frame->Connect(ID_Quit, wxEVT_COMMAND_MENU_SELECTED,
		(wxObjectEventFunction)&MyFrame::OnQuit);
	frame->Connect(ID_About, wxEVT_COMMAND_MENU_SELECTED,
		(wxObjectEventFunction)&MyFrame::OnAbout);

	frame->Show(true);
	SetTopWindow(frame);
	return true;
}