+// frame constructor
+MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
+ : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
+{
+ SetIcon(wxICON(sample));
+
+ // create a menu bar
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append(Minimal_Open, _("Open...\tCtrl-O"));
+ menuFile->AppendSeparator();
+ menuFile->Append(Minimal_PageSetup, _("Page &Setup"));
+ menuFile->Append(Minimal_Preview, _("Print pre&view..."));
+ menuFile->Append(Minimal_Print, _("Print...\tCtrl-P"));
+ menuFile->AppendSeparator();
+ menuFile->Append(wxID_ABOUT, _("&About"));
+ menuFile->AppendSeparator();
+ menuFile->Append(Minimal_Quit, _("&Exit"));
+
+ wxMenu *menuFonts = new wxMenu;
+ menuFonts->AppendRadioItem(Minimal_PrintSmall, _("&Small Printer Fonts"));
+ menuFonts->AppendRadioItem(Minimal_PrintNormal, _("&Normal Printer Fonts"));
+ menuFonts->AppendRadioItem(Minimal_PrintHuge, _("&Huge Printer Fonts"));
+
+ // now append the freshly created menu to the menu bar...
+ wxMenuBar *menuBar = new wxMenuBar;
+ menuBar->Append(menuFile, _("&File"));
+ menuBar->Append(menuFonts, _("F&onts"));
+
+ // ... and attach this menu bar to the frame
+ SetMenuBar(menuBar);
+
+#if wxUSE_STATUSBAR
+ CreateStatusBar(1);
+#endif // wxUSE_STATUSBAR
+
+ m_Html = new wxHtmlWindow(this);
+ m_Html -> SetRelatedFrame(this, _("HTML : %s"));
+#if wxUSE_STATUSBAR
+ m_Html -> SetRelatedStatusBar(0);
+#endif // wxUSE_STATUSBAR
+ m_Name = wxT("test.htm");
+ m_Html -> LoadPage(m_Name);
+
+ m_Prn = new wxHtmlEasyPrinting(_("Easy Printing Demo"), this);
+ m_Prn -> SetHeader(m_Name + wxT("(@PAGENUM@/@PAGESCNT@)<hr>"), wxPAGE_ALL);
+
+ // To specify where the AFM files are kept on Unix,
+ // you may wish to do something like this
+ // m_Prn->GetPrintData()->SetFontMetricPath(wxT("/home/julians/afm"));