Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wanted a dynamic webpage to be loaded into "MFC Web browser control", is there any way to do this ?

Normally for browser control, the parameter of variable.navigate is the URL, but I need to pass an HTML page as input for the control, is this possible?
Posted
Updated 18-Mar-14 2:04am
v2
Comments
chandanadhikari 18-Mar-14 8:07am    
do you mean to say that this document will be the default page shown by the control when it is launched ? may i know what exactly are you trying to achieve here ... a little clarification would help

You can use the NavigateToString method, here is an example : link[^]
 
Share this answer
 
maybe this would help[^]
see the part where they refer to IWebBrowser2::Navigate.
Instead of asking for user input in edit control, you can hard-code it.
 
Share this answer
 
Comments
Rage 18-Mar-14 11:35am    
Not sure, I understand his problem as follows : he does not want to pass a URL or a file, but the content as a string containing HTML code = what he calls an "HTML page", hence my answer.
chandanadhikari 18-Mar-14 12:05pm    
even i was not sure so i asked him in comments ... i saw the vc++ and mfc tags so i thought IWebBrowser2 made sense here.
P Uday kishore 19-Mar-14 0:57am    
it's MFC Web-browser control,
I passed HTML file path as input in navigate function it worked for me.
chandanadhikari 19-Mar-14 3:14am    
please rate my answer(by clicking on the stars in solution heading) if you found it helpful :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900