X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d92395d601fbc740b06299a42e7f6831d0feeba..276a125640f6b921a475284bdba4391c19b25aac:/demos/poem/wxpoem.cpp diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index ae41ff83cf..09e02e2769 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -206,7 +206,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y) dc->SetFont(* NormalFont); long xx; long yy; - dc->GetTextExtent("X", &xx, &yy); + dc->GetTextExtent(_T("X"), &xx, &yy); char_height = (int)yy; if (current_page == 0) @@ -255,7 +255,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y) { ch = -1; i ++; -#ifdef __WXMSW__ +#if defined(__WXMSW__) || defined(__WXMAC__) // Add another to skip the linefeed i ++; #endif @@ -844,9 +844,13 @@ int GetIndex() // Read preferences void ReadPreferences() { +#if wxUSE_RESOURCES +#if wxUSE_RESOURCES wxGetResource("wxPoem", "FontSize", &pointSize); wxGetResource("wxPoem", "X", &XPos); wxGetResource("wxPoem", "Y", &YPos); +#endif +#endif } // Write preferences to disk @@ -854,10 +858,14 @@ void WritePreferences() { #ifdef __WXMSW__ TheMainWindow->GetPosition(&XPos, &YPos); +#if wxUSE_RESOURCES +#if wxUSE_RESOURCES wxWriteResource("wxPoem", "FontSize", pointSize); wxWriteResource("wxPoem", "X", XPos); wxWriteResource("wxPoem", "Y", YPos); #endif +#endif +#endif } // Load a poem from given file, at given point in file.