• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • 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?
0
Bashfull
Asked:
Bashfull
  • 2
1 Solution
 
MirkwoodCommented:
Add the webbrowser control to your form.
0
 
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)
0
 
MirkwoodCommented:
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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