Load HTML page on dialog in VC

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.



.



Relevant Pages

  • Programmatically loading HTML into IHTMLDocument2 causes wrong entry in History
    ... I have a BHO Toolband in which upon some event I am ... My problem is upon loading the html content, ... visited url's, I see "MyHtml". ... programmatically loading (I created the same page using a HTML editor ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Load HTML page on dialog in VC6
    ... class we can load a html page. ... i create a html class on dialog and load a html ... myhtml *obj; ... Can somone tell how htmlpage will cover whole dialog and there should be ...
    (microsoft.public.vc.mfc.docview)
  • Load HTML page on dialog in VC6
    ... i create a html class on dialog and load a html ... myhtml *obj; ... Can somone tell how htmlpage will cover whole dialog and there should be no ...
    (microsoft.public.vc.mfc.docview)
  • Re: Unhandled exception in MSHTML.DLL
    ... > always crashes when its CHtmlView view started to load a specific local ... > html page, please let me know if I have misunderstood anything. ... > program crashes at. ... All 3 files load just fine in a regular browser. ...
    (microsoft.public.vc.mfc)
  • Re: Lost formatting in browser view source
    ... At the same time your html pages without php-code are processed by php. ... If you are concerned about users links and bookmarks to break, you have the nice option in apache to rewrite rules, if they try to load a "missing" html page, redirect them to a php file with the same name. ... run your editor, load 100 pages, use find/replace to change the address ...
    (alt.php)