call OnInit() from all samples to allow using standard command line options with all of them (patch 1623971)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-02-04 00:34:18 +00:00
parent 28f15a1f70
commit 45e6e6f8ab
88 changed files with 264 additions and 0 deletions

View File

@ -163,6 +163,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_ACCESSIBILITY
// Note: JAWS for Windows will only speak the context-sensitive
// help if you use this help provider:

View File

@ -90,6 +90,9 @@ END_EVENT_TABLE()
// Initialise this in OnInit, not statically
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame* frame = new MyFrame((wxFrame *)NULL, wxID_ANY, _T("Animation Demo"),

View File

@ -96,6 +96,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame(_T("wxArtProvider sample"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -548,6 +548,9 @@ END_EVENT_TABLE()
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxFrame* frame = new MyFrame(NULL,
wxID_ANY,
wxT("wxAUI Sample Application"),

View File

@ -266,6 +266,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(_T("Calendar wxWidgets sample")
#ifndef __WXWINCE__

View File

@ -182,6 +182,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create and show the main application window
MyFrame *frame = new MyFrame(_T("Caret wxWidgets sample"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -151,6 +151,9 @@ IMPLEMENT_APP(CheckListBoxApp)
// init our app: create windows
bool CheckListBoxApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
CheckListBoxFrame *pFrame = new CheckListBoxFrame
(
NULL,

View File

@ -126,6 +126,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create and show the main frame
MyFrame* frame = new MyFrame;

View File

@ -154,6 +154,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame(_T("wxComboCtrl and wxOwnerDrawnComboBox Sample"));

View File

@ -85,6 +85,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// we're using wxConfig's "create-on-demand" feature: it will create the
// config object when it's used for the first time. It has a number of
// advantages compared with explicitly creating our wxConfig:

View File

@ -365,6 +365,9 @@ IMPLEMENT_APP (MyApp)
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
MyFrame *frame = new MyFrame(NULL, wxT("wxDataViewCtrl feature test"), 10, 10, 800, 340);
frame->Show(true);

View File

@ -635,6 +635,9 @@ void CheckSupportForAllDataTypes(wxDb *pDb)
bool DatabaseDemoApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
DbConnectInf = NULL;
Contact = NULL;

View File

@ -238,6 +238,9 @@ MyCanvas *myCanvas = (MyCanvas *) NULL;
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_IMAGE
wxInitAllImageHandlers();
#endif

View File

@ -150,6 +150,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(_T("Dial-up wxWidgets demo"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -167,6 +167,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#ifdef __WXMSW__
if ( argc == 2 && !wxStricmp(argv[1], _T("/dx")) )
{

View File

@ -883,6 +883,9 @@ END_EVENT_TABLE()
// `Main program' equivalent, creating windows and returning main app frame
bool DnDApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_DRAG_AND_DROP || wxUSE_CLIPBOARD
// switch on trace messages
#if wxUSE_LOG

View File

@ -55,6 +55,9 @@ MyApp::MyApp(void)
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
//// Find out if we're:
//// multiple window: multiple windows, each view in a separate frame
//// single window: one view (within the main frame) and one document at a time, as in Windows Write.

View File

@ -368,6 +368,9 @@ MyApp::MyApp()
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_LIBPNG
wxImage::AddHandler( new wxPNGHandler );
#endif

View File

@ -353,6 +353,9 @@ bool MyApp::LoadImages()
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(_T("Drawing sample"),
wxPoint(50, 50), wxSize(550, 340));

View File

@ -66,6 +66,9 @@ IMPLEMENT_APP (MyApp)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame(NULL, _T("Dynamic wxWidgets App"), 50, 50, 450, 340);

View File

@ -117,6 +117,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
MyFrame *frame = new MyFrame;
frame->Show(true);

View File

@ -200,6 +200,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame(_T("Event wxWidgets Sample"),
wxPoint(50, 50), wxSize(600, 340));

View File

@ -238,6 +238,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame();

View File

@ -386,6 +386,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(_T("Exec wxWidgets sample"),
wxDefaultPosition, wxSize(500, 140));

View File

@ -234,6 +234,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(wxT("Font wxWidgets demo"),
wxPoint(50, 50), wxSize(600, 400));

View File

@ -287,6 +287,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create a simple help provider to make SetHelpText() do something.
// Note that this must be set before any SetHelpText() calls are made.
#if USE_SIMPLE_HELP_PROVIDER

View File

@ -85,6 +85,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// we use a PNG image in our HTML page
wxImage::AddHandler(new wxPNGHandler);

View File

@ -102,6 +102,9 @@
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxInitAllImageHandlers();
#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
wxFileSystem::AddHandler(new wxZipFSHandler);

View File

@ -53,6 +53,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#ifdef __WXMOTIF__
delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
#endif

View File

@ -125,6 +125,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame(_T("wxWebKit Sample"));

View File

@ -128,6 +128,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_LIBPNG
wxImage::AddHandler(new wxPNGHandler);
#endif

View File

@ -154,6 +154,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_SYSTEM_OPTIONS
wxSystemOptions::SetOption(wxT("no-maskblt"), 1);
#endif

View File

@ -155,6 +155,9 @@ wxFSFile* MyVFS::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
wxDefaultPosition, wxSize(640, 480));

View File

@ -156,6 +156,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame( _("wxHtmlWindow testing application"),
wxDefaultPosition, wxSize(640, 480) );

View File

@ -97,6 +97,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_LIBPNG
wxImage::AddHandler(new wxPNGHandler);
#endif

View File

@ -1168,6 +1168,9 @@ void MyFrame::OnPaste(wxCommandEvent& WXUNUSED(event))
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxInitAllImageHandlers();
wxFrame *frame = new MyFrame();

View File

@ -166,6 +166,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
long lng = -1;
if ( argc == 2 )

View File

@ -76,6 +76,9 @@ END_EVENT_TABLE()
// main frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
m_frame = new MyFrame(NULL, _T("Client"));
m_frame->Show(true);

View File

@ -66,6 +66,9 @@ END_EVENT_TABLE()
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
m_frame = new MyFrame(NULL, _T("Server"));
m_frame->Show(true);

View File

@ -43,6 +43,9 @@ int nButtons = 0;
// Initialise this in OnInit, not statically
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxJoystick stick(wxJOYSTICK1);
if (!stick.IsOk())
{

View File

@ -240,6 +240,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame(_T("Keyboard wxWidgets App"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -41,6 +41,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame;

View File

@ -322,6 +322,9 @@ END_EVENT_TABLE()
bool LboxTestApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxFrame *frame = new LboxTestFrame(_T("wxListBox sample"));
frame->Show();

View File

@ -153,6 +153,9 @@ int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame(wxT("wxListCtrl Test"));

View File

@ -112,6 +112,9 @@ END_EVENT_TABLE()
// Initialise this in OnInit, not statically
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
frame = new MyFrame((wxFrame *)NULL, wxID_ANY, _T("MDI Demo"),

View File

@ -409,6 +409,9 @@ IMPLEMENT_APP(wxMediaPlayerApp)
// ----------------------------------------------------------------------------
bool wxMediaPlayerApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// SetAppName() lets wxConfig and others know where to write
SetAppName(wxT("wxMediaPlayer"));

View File

@ -56,6 +56,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame((wxFrame *) NULL);

View File

@ -344,6 +344,9 @@ IMPLEMENT_APP(MyApp)
// main frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame* frame = new MyFrame;

View File

@ -232,6 +232,9 @@ BOOL CTheApp::OnIdle(LONG WXUNUSED(lCount))
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if !START_WITH_MFC_WINDOW
// as we're not inside wxWidgets main loop, the default logic doesn't work
// in our case and we need to do this explicitly

View File

@ -57,6 +57,9 @@ wxButton *button = (wxButton*) NULL;
// main frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
main_frame = new MyMainFrame((wxFrame *) NULL, wxID_ANY, _T("wxFrame sample"),
wxPoint(100, 100), wxSize(300, 200));

View File

@ -86,6 +86,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxInitAllImageHandlers();
SetVendorName(_T("Free world"));

View File

@ -404,6 +404,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
SetVendorName(_T("Free world"));
SetAppName(_T("wxEdit"));

View File

@ -22,6 +22,9 @@ IMPLEMENT_APP(TestApp)
bool TestApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
bool is_use_display =
#if wxUSE_DISPLAY
true

View File

@ -32,6 +32,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame(NULL, wxID_ANY, _T("wxWidgets Native Dialog Sample"), wxPoint(0, 0), wxSize(300, 250));

View File

@ -34,6 +34,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_HELP
wxHelpProvider::Set( new wxSimpleHelpProvider );
#endif

View File

@ -125,6 +125,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(_T("OleAuto wxWidgets App"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -521,6 +521,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
(void) MyFrame::Create(NULL);

View File

@ -246,6 +246,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
Args(argc, argv);
// Create the main frame window

View File

@ -40,6 +40,9 @@
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame(NULL, wxT("wxWidgets Penguin Sample"),
wxDefaultPosition, wxDefaultSize);

View File

@ -88,6 +88,9 @@ IMPLEMENT_APP(OwnerDrawnApp)
// init our app: create windows
bool OwnerDrawnApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
OwnerDrawnFrame *pFrame
= new OwnerDrawnFrame(NULL, _T("wxWidgets Ownerdraw Sample"),
50, 50, 450, 340);

View File

@ -27,6 +27,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
wxImage::AddHandler(new wxPNGHandler);
// Create the main frame window

View File

@ -289,6 +289,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
m_frame = new MyFrame(_T("Popup wxWidgets App"));

View File

@ -77,6 +77,9 @@ bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxChar *text, float m
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
wxInitAllImageHandlers();
m_testFont.Create(10, wxSWISS, wxNORMAL, wxNORMAL);

View File

@ -114,6 +114,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame(_T("Proportional resize"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -318,6 +318,9 @@ IMPLEMENT_APP(RegApp)
// `Main program' equivalent, creating windows and returning main app frame
bool RegApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main frame window and show it
RegFrame *frame = new RegFrame(NULL, _T("wxRegTest"), 50, 50, 600, 350);
frame->Show(true);

View File

@ -201,6 +201,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
new MyFrame;

View File

@ -333,6 +333,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_HELP
wxHelpProvider::Set(new wxSimpleHelpProvider);
#endif

View File

@ -127,6 +127,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#if wxUSE_LIBPNG
wxImage::AddHandler( new wxPNGHandler );
#endif

View File

@ -40,6 +40,9 @@ int winNumber = 1;
// Initialise this in OnInit, not statically
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
frame = new MyFrame(NULL, wxID_ANY, _T("Sash Demo"), wxPoint(0, 0), wxSize(500, 400),

View File

@ -672,6 +672,9 @@ void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxFrame *frame = new MyFrame();
frame->Show( true );

View File

@ -448,6 +448,9 @@ void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxFrame *frame = new MyFrame();
frame->Show( true );

View File

@ -125,6 +125,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxInitAllImageHandlers();
// Create the main application window

View File

@ -154,6 +154,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame();

View File

@ -123,6 +123,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main application window
MyFrame *frame = new MyFrame();

View File

@ -159,6 +159,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame(_T("wxWidgets Sound Sample"));

View File

@ -123,6 +123,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxImage::AddHandler(new wxPNGHandler);
// create the main application window

View File

@ -148,6 +148,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create and show the main frame
MyFrame* frame = new MyFrame;

View File

@ -267,6 +267,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
MyFrame *frame = new MyFrame(_T("wxStatusBar sample"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -37,6 +37,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit(void)
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
dialog = new MyDialog(NULL, wxID_ANY, wxT("wxTaskBarIcon Test Dialog"), wxDefaultPosition, wxSize(365, 290));

View File

@ -425,6 +425,9 @@ enum
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame((wxFrame *) NULL,
_T("Text wxWidgets sample"), 50, 50, 700, 550);

View File

@ -363,6 +363,9 @@ MyApp::MyApp()
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// uncomment this to get some debugging messages from the trace code
// on the console (or just set WXTRACE env variable to include "thread")
//wxLog::AddTraceMask("thread");

View File

@ -269,6 +269,9 @@ IMPLEMENT_APP(MyApp)
// main frame
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame* frame = new MyFrame((wxFrame *) NULL, wxID_ANY,
_T("wxToolBar Sample"),

View File

@ -154,6 +154,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame(wxT("wxTreeCtrl Test"), 50, 50, 450, 600);

View File

@ -72,6 +72,9 @@ wxString file_name2 = wxString(_T("test_wx2.dat"));
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create the main frame window
MyFrame *frame = new MyFrame((wxFrame *) NULL, _T("wxWidgets Types Demo"),
wxPoint(50, 50), wxSize(450, 340));

View File

@ -74,6 +74,9 @@ IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// Create and display the main frame window.
MyFrame *frame = new MyFrame((wxFrame *) NULL, wxT("Validator Test"),
50, 50, 300, 250);

View File

@ -213,6 +213,9 @@ IMPLEMENT_APP(VScrollApp)
// 'Main program' equivalent: the program execution "starts" here
bool VScrollApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// create the main application window
VScrollFrame *frame = new VScrollFrame;

View File

@ -353,6 +353,9 @@ IMPLEMENT_APP(MyApp)
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
MyFrame *frame = new MyFrame(_T("wxWizard Sample"));
// and show it (the frames, unlike simple controls, are not shown when

View File

@ -60,6 +60,9 @@ IMPLEMENT_APP(MyApp)
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
// If there is any of a certain format of image in the xrcs, then first
// load a handler for that image type. This example uses XPMs, but if
// you want PNGs, then add a PNG handler, etc. See wxImage::AddHandler()