• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

HTML in a window

Is it possible to have internet explorer load an HTML page into one of my programs windows?  Like the visual c++ help does.  What classes or functions can do this?
  • 2
1 Solution
Add the webbrowser control to your form.
BashfullAuthor Commented:
Sorry, i didn't mention i am using visual c++/mfc.  How would i get the control for it to be used there? (I assume your answer was for VB)
No I did not.

Choose project/add components/
and add the webbrowser control.

Here is some sample code
CRect rect;
GetClientRect (&rect);// Create the control.
m_pBrowser = new CWebBrowser;ASSERT (m_pBrowser);
if (!m_pBrowser->Create(NULL,NULL,WS_VISIBLE,rect,this,NULL)){
    TRACE("failed to create browser\n");    delete m_pBrowser;
    m_pBrowser = NULL;    return 0;}// Initialize the first URL.
COleVariant noArg;
m_pBrowser->Navigate("www.microsoft.com",&noArg,&noArg,&noArg,&noArg);return 0;

BTW: MFC has now also the CHtmlView. Also very good.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now