Page 1 of 1

wxHtmlwindow 显示中文办法

Posted: Thu Jan 25, 2018 6:19 pm
by lfjking
我使用的 是 wxWidgets 3.10 Unicode

Code: Select all

wxString              mHtmlPath(wxT("d:\\a.html"));
wxHtmlWindow  *mHtml;
//    Init......
      wxFileInputStream   fs(mHtmlPath);
      wxTextInputStream   tfs(fs);
      wxString   ret = tfs.ReadLine(), results;
      while(!tfs.GetInputStream().Eof()){
         results += ret;
         ret = tfs.ReadLine();
      }
      results += ret;
mHtml->SetPage(results);