]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/html/about/about.cpp
Don't use a destroy event handler to disconnect the native control's delegate as...
[wxWidgets.git] / samples / html / about / about.cpp
index 282eb378353b9a0cfb91e46757e0d9b63cefbb9d..9205f459963f5bc3a035ae541a403b1643e2a427 100644 (file)
@@ -1,6 +1,12 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        test.cpp
-// Purpose:     wxHtml testing example
+// Name:        about.cpp
+// Purpose:     wxHtml sample: about dialog test
+// Author:      ?
+// Modified by:
+// Created:     ?
+// RCS-ID:      $Id$
+// Copyright:   (c) wxWidgets team
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxhtml.h"
 #include "wx/statline.h"
 
+#ifndef __WXMSW__
+    #include "../../sample.xpm"
+#endif
+
+
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
@@ -85,6 +96,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);
 
@@ -106,6 +120,8 @@ bool MyApp::OnInit()
 MyFrame::MyFrame(const wxString& title)
        : wxFrame((wxFrame *)NULL, wxID_ANY, title)
 {
+    SetIcon(wxICON(sample));
+
     // create a menu bar
     wxMenu *menuFile = new wxMenu;