X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489f6cf713b6b5bd9746af238b260c7d13d1dc40..8fde39dfea217d340c9151ae70b4d23d93e0eaf7:/demos/poem/wxpoem.cpp diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index f4a749d17c..13da0411e9 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -14,10 +14,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "wxpoem.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -183,8 +179,8 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y) // See what ACTUAL char height is if(m_normalFont) dc->SetFont(*m_normalFont); - long xx; - long yy; + wxCoord xx; + wxCoord yy; dc->GetTextExtent(_T("X"), &xx, &yy); char_height = (int)yy; @@ -755,11 +751,13 @@ int GetIndex() // Read preferences void MainWindow::ReadPreferences() { +/* TODO: convert this code to use wxConfig #if wxUSE_RESOURCES wxGetResource(_T("wxPoem"), _T("FontSize"), &pointSize); wxGetResource(_T("wxPoem"), _T("X"), &XPos); wxGetResource(_T("wxPoem"), _T("Y"), &YPos); #endif +*/ } // Write preferences to disk @@ -767,11 +765,13 @@ void MainWindow::WritePreferences() { #ifdef __WXMSW__ TheMainWindow->GetPosition(&XPos, &YPos); +/* TODO: convert this code to use wxConfig #if wxUSE_RESOURCES wxWriteResource(_T("wxPoem"), _T("FontSize"), pointSize); wxWriteResource(_T("wxPoem"), _T("X"), XPos); wxWriteResource(_T("wxPoem"), _T("Y"), YPos); #endif +*/ #endif } @@ -888,7 +888,7 @@ long MainWindow::DoSearch(void) // Only match if we're looking at a different poem // (no point in displaying the same poem again) - if ((ch == m_searchString[i]) && (last_poem_start != previous_poem_start)) + if ((m_searchString[i] == ch) && (last_poem_start != previous_poem_start)) { if (i == 0) last_find = ftell(file);