bool FortyApp::OnInit()
{
bool largecards = false;
- m_dir = wxGetCwd();
+#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);
FortyFrame::Help(wxCommandEvent& event)
{
#if wxUSE_HTML
- wxString htmlFile = wxGetApp().GetDir() + wxFILE_SEP_PATH + wxT("about.htm");
- if (wxFileExists(htmlFile))
+ if (wxFileExists(wxGetApp().GetHelpFile()))
{
FortyAboutDialog dialog(this, wxID_ANY, wxT("Forty Thieves Instructions"));
if (dialog.ShowModal() == wxID_OK)
{
#if wxUSE_HTML
wxString htmlText;
- wxString htmlFile = wxGetApp().GetDir() + wxFILE_SEP_PATH + wxT("about.htm");
+ wxString htmlFile = wxGetApp().GetHelpFile();
{
wxTextFile file(htmlFile);
static const wxColour& BackgroundColour();
static const wxColour& TextColour();
static const wxBrush& BackgroundBrush();
- const wxString& GetDir() const { return m_dir; }
+ const wxString& GetHelpFile() const { return m_helpFile; }
private:
static wxColour* m_backgroundColour;
static wxColour* m_textColour;
static wxBrush* m_backgroundBrush;
- wxString m_dir;
+ wxString m_helpFile;
};
DECLARE_APP(FortyApp)