Simplified html reading because previous one caused conflicts in wxUSE_STL=1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
#include "scoredg.h"
|
#include "scoredg.h"
|
||||||
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
#include "wx/file.h"
|
#include "wx/textfile.h"
|
||||||
#include "wx/html/htmlwin.h"
|
#include "wx/html/htmlwin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -331,15 +331,13 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
|
|||||||
// wxSetWorkingDirectory(wxGetApp().GetAppDir());
|
// wxSetWorkingDirectory(wxGetApp().GetAppDir());
|
||||||
// wxString htmlFile(wxGetApp().GetFullAppPath(wxT("about.htm")));
|
// wxString htmlFile(wxGetApp().GetFullAppPath(wxT("about.htm")));
|
||||||
|
|
||||||
if (wxFileExists(htmlFile))
|
wxTextFile file(htmlFile);
|
||||||
|
if (file.Exists())
|
||||||
{
|
{
|
||||||
wxFile file;
|
file.Open();
|
||||||
file.Open(htmlFile, wxFile::read);
|
for ( htmlText = file.GetFirstLine();
|
||||||
long len = file.Length();
|
!file.Eof();
|
||||||
wxChar* buf = htmlText.GetWriteBuf(len + 1);
|
htmlText << file.GetNextLine() << _T("\n") ) ;
|
||||||
file.Read(buf, len);
|
|
||||||
buf[len] = 0;
|
|
||||||
htmlText.UngetWriteBuf();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user