Solved

HTML in a window

Posted on 1999-01-22
3
144 Views
Last Modified: 2013-11-20
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
Comment
Question by:Bashfull
  • 2
3 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1328181
Add the webbrowser control to your form.
0
 

Author Comment

by:Bashfull
ID: 1328182
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
 
LVL 13

Accepted Solution

by:
Mirkwood earned 100 total points
ID: 1328183
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Strange date stored 22 119
How to know only "File created" with EventLog 3 34
java ^ examples 8 65
Work with App store 7 51
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question