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:
parent
28f15a1f70
commit
45e6e6f8ab
@ -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:
|
||||
|
@ -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"),
|
||||
|
@ -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));
|
||||
|
@ -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"),
|
||||
|
@ -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__
|
||||
|
@ -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));
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
||||
|
@ -635,6 +635,9 @@ void CheckSupportForAllDataTypes(wxDb *pDb)
|
||||
|
||||
bool DatabaseDemoApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
DbConnectInf = NULL;
|
||||
Contact = NULL;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
@ -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")) )
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -368,6 +368,9 @@ MyApp::MyApp()
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#if wxUSE_LIBPNG
|
||||
wxImage::AddHandler( new wxPNGHandler );
|
||||
#endif
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
||||
|
@ -117,6 +117,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
MyFrame *frame = new MyFrame;
|
||||
|
||||
frame->Show(true);
|
||||
|
@ -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));
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -128,6 +128,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#if wxUSE_LIBPNG
|
||||
wxImage::AddHandler(new wxPNGHandler);
|
||||
#endif
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
@ -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) );
|
||||
|
@ -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
|
||||
|
@ -1168,6 +1168,9 @@ void MyFrame::OnPaste(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
wxFrame *frame = new MyFrame();
|
||||
|
@ -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 )
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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));
|
||||
|
@ -41,6 +41,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame;
|
||||
|
||||
|
@ -322,6 +322,9 @@ END_EVENT_TABLE()
|
||||
|
||||
bool LboxTestApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
wxFrame *frame = new LboxTestFrame(_T("wxListBox sample"));
|
||||
frame->Show();
|
||||
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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"),
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
@ -86,6 +86,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
SetVendorName(_T("Free world"));
|
||||
|
@ -404,6 +404,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
SetVendorName(_T("Free world"));
|
||||
SetAppName(_T("wxEdit"));
|
||||
|
||||
|
@ -22,6 +22,9 @@ IMPLEMENT_APP(TestApp)
|
||||
|
||||
bool TestApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
bool is_use_display =
|
||||
#if wxUSE_DISPLAY
|
||||
true
|
||||
|
@ -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));
|
||||
|
||||
|
@ -34,6 +34,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#if wxUSE_HELP
|
||||
wxHelpProvider::Set( new wxSimpleHelpProvider );
|
||||
#endif
|
||||
|
@ -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));
|
||||
|
@ -521,6 +521,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// Create the main frame window
|
||||
(void) MyFrame::Create(NULL);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -127,6 +127,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#if wxUSE_LIBPNG
|
||||
wxImage::AddHandler( new wxPNGHandler );
|
||||
#endif
|
||||
|
@ -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),
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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
|
||||
|
@ -154,6 +154,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// Create the main application window
|
||||
MyFrame *frame = new MyFrame();
|
||||
|
||||
|
@ -123,6 +123,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// Create the main application window
|
||||
MyFrame *frame = new MyFrame();
|
||||
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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"),
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user