X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/886c25325e93397f7d523d8a0119069d29ead0e7..702723413ed52b1f538d9c8deab8abfa3f8beb9a:/demos/forty/forty.cpp diff --git a/demos/forty/forty.cpp b/demos/forty/forty.cpp index 0b4e23f8f3..c71d8a241d 100644 --- a/demos/forty/forty.cpp +++ b/demos/forty/forty.cpp @@ -75,6 +75,13 @@ FortyApp::~FortyApp() bool FortyApp::OnInit() { bool largecards = false; +#ifndef __WXWINCE__ + m_helpFile = wxGetCwd() + wxFILE_SEP_PATH + wxT("about.htm"); + if (!wxFileExists(m_helpFile)) +#endif + { + m_helpFile = wxPathOnly(argv[0]) + wxFILE_SEP_PATH + wxT("about.htm"); + } wxSize size(668,510); @@ -233,7 +240,7 @@ void FortyFrame::Help(wxCommandEvent& event) { #if wxUSE_HTML - if (wxFileExists(wxT("about.htm"))) + if (wxFileExists(wxGetApp().GetHelpFile())) { FortyAboutDialog dialog(this, wxID_ANY, wxT("Forty Thieves Instructions")); if (dialog.ShowModal() == wxID_OK) @@ -324,13 +331,9 @@ bool FortyAboutDialog::AddControls(wxWindow* parent) { #if wxUSE_HTML wxString htmlText; - wxString htmlFile(wxT("about.htm")); + wxString htmlFile = wxGetApp().GetHelpFile(); - //if (!wxGetApp().GetMemoryTextResource(wxT("about.htm"), htmlText)) { -// wxSetWorkingDirectory(wxGetApp().GetAppDir()); -// wxString htmlFile(wxGetApp().GetFullAppPath(wxT("about.htm"))); - wxTextFile file(htmlFile); if (file.Exists()) { @@ -347,11 +350,6 @@ bool FortyAboutDialog::AddControls(wxWindow* parent) } // Customize the HTML -#if 0 - wxString verString; - verString.Printf("%.2f", stVERSION_NUMBER); - htmlText.Replace(wxT("$VERSION$"), verString); -#endif htmlText.Replace(wxT("$DATE$"), _T(__DATE__)); wxSize htmlSize(400, 290);