Page 1 of 1

use the wxHtmlWindow's LoadPage,but the CPU is 100%

Posted: Fri Sep 26, 2008 9:08 am
by sms91

Code: Select all

	wxFileSystem::AddHandler(new wxInternetFSHandler);
	wxHtmlWindow * htmlwindow = new wxHtmlWindow( this , wxID_HTML_WINDOW , pos , size) ;
htmlwindow->LoadPage( wxT("http://www.google.com")) ;

I use wxWidgets-2.8.7 , VC++2003.

The program block at the [color=red]LoadPage [/color]sentence at all times , so the CPU is 100%.

Posted: Fri Sep 26, 2008 4:27 pm
by jmason1182
Yeah, you need to add the "Internet File System Handler" to be able to load from the internet.

Either add the following line before creating any wxHtmlWindows or in the main part of your wxApp.

Code: Select all

    wxFileSystem::AddHandler(new wxInternetFSHandler);
Here's a related post that gives lots of code:
http://forums.wxwidgets.org/viewtopic.p ... htmlwindow

Hope that helps.