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

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
sms91
Knows some wx things
Knows some wx things
Posts: 32
Joined: Tue Sep 09, 2008 5:26 am
Location: China

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

Post by sms91 » Fri Sep 26, 2008 9:08 am

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%.

jmason1182
Earned some good credits
Earned some good credits
Posts: 149
Joined: Fri Dec 14, 2007 3:40 pm
Location: Midland, TX
Contact:

Post by jmason1182 » Fri Sep 26, 2008 4:27 pm

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.
John A. Mason
Midland, TX

Post Reply