X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f37db42915a02ad73ac3c692fc6f76c10c1c5b9..02fd8b9b6186623ed61019ac7e69ed9a4ef16773:/samples/html/printing/printing.cpp diff --git a/samples/html/printing/printing.cpp b/samples/html/printing/printing.cpp index 6ce878f0a5..036aa8912f 100644 --- a/samples/html/printing/printing.cpp +++ b/samples/html/printing/printing.cpp @@ -128,6 +128,9 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + #if wxUSE_LIBPNG wxImage::AddHandler(new wxPNGHandler); #endif @@ -263,17 +266,15 @@ void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnPrintSmall(wxCommandEvent& WXUNUSED(event)) { - int fontsizes[] = { 4, 6, 8, 10, 12, 20, 24 }; - m_Prn->SetFonts(wxEmptyString, wxEmptyString, fontsizes); + m_Prn->SetStandardFonts(8); } void MyFrame::OnPrintNormal(wxCommandEvent& WXUNUSED(event)) { - m_Prn->SetFonts(wxEmptyString, wxEmptyString, 0); + m_Prn->SetStandardFonts(12); } void MyFrame::OnPrintHuge(wxCommandEvent& WXUNUSED(event)) { - int fontsizes[] = { 20, 26, 28, 30, 32, 40, 44 }; - m_Prn->SetFonts(wxEmptyString, wxEmptyString, fontsizes); + m_Prn->SetStandardFonts(28); }