X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..21b2dde583e83d3ad455c20fa8db717037b5f548:/samples/html/virtual/virtual.cpp?ds=sidebyside diff --git a/samples/html/virtual/virtual.cpp b/samples/html/virtual/virtual.cpp index 7ac3a57d5f..27c1b8a57a 100644 --- a/samples/html/virtual/virtual.cpp +++ b/samples/html/virtual/virtual.cpp @@ -4,11 +4,6 @@ // demonstrates virtual file systems feature ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "test.cpp" - #pragma interface "test.cpp" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -126,7 +121,7 @@ wxFSFile* MyVFS::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location) Minimal_Forward, // controls start here (the numbers are, of course, arbitrary) - Minimal_Text = 1000, + Minimal_Text = 1000 }; // ---------------------------------------------------------------------------- @@ -160,9 +155,12 @@ 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"), - wxPoint(50, 50), wxSize(640, 480)); + wxDefaultPosition, wxSize(640, 480)); // Show it and tell the application that it's our main window // @@@ what does it do exactly, in fact? is it necessary here? @@ -202,11 +200,15 @@ wxHtmlWindow *html; // ... and attach this menu bar to the frame SetMenuBar(menuBar); +#if wxUSE_STATUSBAR CreateStatusBar(2); +#endif // wxUSE_STATUSBAR html = new wxHtmlWindow(this); html -> SetRelatedFrame(this, _("VFS Demo: '%s'")); +#if wxUSE_STATUSBAR html -> SetRelatedStatusBar(1); +#endif // wxUSE_STATUSBAR html -> LoadPage(wxT("start.htm")); }