mfc >> Load full html page

by xcppcoder@gmail.com » Tue, 21 Mar 2006 19:27:38 GMT

Hello
I want to load a page from HTTP, and this page is made up from several
URL.
If I use CInternetSession::OpenURL(), then I will not get the sub
pages.
I need a way that let me load the page with all its sub pages.
I know that i can use CHtmlView but I don't need a UI in my
application.
Thanks in advance



mfc >> Load full html page

by Ajay Kalra » Tue, 21 Mar 2006 22:25:50 GMT


I am not sure what you mean by sub pages. If you mean links, you will
need to traverse the document yourself. If you dont have UI in your
application, you can do it by hosting MSHTML. Its same as
IWebBrowser2(CHTMLView) but with no UI. Sample TEAR in MSDN shows how
to use this. Another option is to use URLDownloadToFile, which will
save the contents to a file.

------
Ajay Kalra
XXXX@XXXXX.COM




Similar Threads

1. HttpListener based app loading Java Applet into html page - CSharp/C#

2. WebBrowser page loading and HTML capture

3. HTML page cannot load the COM object which is hosted by ATL COM Service

4. Load HTML page on dialog in VC

Hi,

As we can create a view class on dialog which occupied the complete dialog,
the same way we can create a htmlview class on dialog. In this html view
class we can load a html page. I have no problem to do that.
What is the problem?
The html page doesn't completely shown on dialog. Some space in each edge of
dialog is left. I want that html page should be completely covered the
dialog.

I am doing like this
class myhtml:public CHtmlView{
...
};
In OnCreate function of dialog class, i create a html class object .
In dialogdlg.h
myhtml *obj;
in dialogdlg.cpp
OnCreate()
{
CRect rect;
 GetClientRect(&rect);
obj=new myhtml;
obj.Create(NULL,NULL,WS_CHILD|WS_VISIBLE,rect,this,1);
}

and in myhtml class i load a html page by using 
LoadFromResource(IDR_HTML1);.
HTML page doesn't cover dialog box completely while size of htmlpage and
dialog are same.

Can somone tell how htmlpage will cover whole dialog and there should be no
vertical scroll bar.



5. IWebBrowser2: How to Load HTML content from a Stream for main page and embedded iframe document

6. event that HTML page loaded

Hi All,

I have a dialog based application. In this application, one of the windows 
is in fact a CDHtmlDialog. As you know, this type of dialog loads an HTML 
resource and displays it. I would like to know if there is any way to know 
when this page has fully loaded.  I know about "OnNavigateComplete" but this 
function seems to get triggered before the actual HTML page has completely 
loaded. In other words, I think it only says "ok, I am done navigating to 
that page and now the page is being loaded." Is that correct ? If so, again, 
how would I know when the HTML has been completely loaded? This would be an 
event that would tell me "ok, I have completely loaded the HTML page."

Thanks.


7. Load HTML page on dialog in VC6 - VC MFC

8. Downloading full page source of a web page