wxColour* FortyApp::m_textColour = 0;
wxBrush* FortyApp::m_backgroundBrush = 0;
-FortyApp::FortyApp()
-{
-}
-
FortyApp::~FortyApp()
{
delete m_backgroundColour;
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);
#endif // wxUSE_STATUSBAR
}
-FortyFrame::~FortyFrame()
-{
-}
-
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
{
if (m_canvas->OnCloseCanvas() )
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)
{
#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())
{
file.Open();
- for ( htmlText = file.GetFirstLine();
- !file.Eof();
+ for ( htmlText = file.GetFirstLine();
+ !file.Eof();
htmlText << file.GetNextLine() << _T("\n") ) ;
}
}
}
// 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);
wxHtmlWindow* html = new wxHtmlWindow(this, ID_ABOUT_HTML_WINDOW, wxDefaultPosition, htmlSize, borderStyle);
html -> SetBorders(10);
html -> SetPage(htmlText);
-
+
//// Start of sizer-based control creation
wxSizer *item0 = new wxBoxSizer( wxVERTICAL );