X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16f26dadb502b874b6aa7b5fa914928be0c5f1af..32b4e9ecd77e106fcbadc95e0671c611b136456a:/samples/html/help/help.cpp diff --git a/samples/html/help/help.cpp b/samples/html/help/help.cpp index d54817fab5..062949c8cf 100644 --- a/samples/html/help/help.cpp +++ b/samples/html/help/help.cpp @@ -3,11 +3,6 @@ // Purpose: wxHtml testing example ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "help.cpp" - #pragma interface "help.cpp" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -60,7 +55,7 @@ void OnClose(wxCloseEvent& event); private: wxHtmlHelpController help; - + // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() }; @@ -107,12 +102,15 @@ // `Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + wxInitAllImageHandlers(); -#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB +#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB wxFileSystem::AddHandler(new wxZipFSHandler); #endif SetVendorName(wxT("wxWidgets")); - SetAppName(wxT("wxHTMLHelp")); + SetAppName(wxT("wxHTMLHelp")); // Create the main application window MyFrame *frame = new MyFrame(_("HTML Help Sample"), @@ -137,7 +135,7 @@ // frame constructor MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) - : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size), + : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size), help(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES) { // create a menu bar @@ -185,7 +183,7 @@ if ( help.GetFrame() ) // returns NULL if no help frame active help.GetFrame()->Close(true); // now we can safely delete the config pointer - event.Skip(); + event.Skip(); delete wxConfig::Set(NULL); }