X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd2040736c6ff011a5a62b1abd26173806c36de4..fec34ef52dad898e72dd488f939ea0db5ec09ead:/samples/font/font.cpp?ds=inline diff --git a/samples/font/font.cpp b/samples/font/font.cpp index 0773236da9..f6c8d5f32d 100644 --- a/samples/font/font.cpp +++ b/samples/font/font.cpp @@ -36,7 +36,7 @@ #ifdef __WXMAC__ #undef wxFontDialog - #include "wx/mac/fontdlg.h" + #include "wx/osx/fontdlg.h" #endif // used as title for several dialog boxes @@ -234,6 +234,9 @@ IMPLEMENT_APP(MyApp) // `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(wxT("Font wxWidgets demo"), wxPoint(50, 50), wxSize(600, 400)); @@ -891,7 +894,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) dc.SetTextForeground(m_colour); // the size of one cell (Normally biggest char + small margin) - long maxCharWidth, maxCharHeight; + wxCoord maxCharWidth, maxCharHeight; dc.GetTextExtent(wxT("W"), &maxCharWidth, &maxCharHeight); int w = maxCharWidth + 5, h = maxCharHeight + 4; @@ -904,7 +907,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) { wxChar c = (wxChar)(32 * (i + 1) + j); - long charWidth, charHeight; + wxCoord charWidth, charHeight; dc.GetTextExtent(c, &charWidth, &charHeight); dc.DrawText (