Hosting MSHTML or WebBrowser 
Author Message
 Hosting MSHTML or WebBrowser

I'm starting a new project....

In this project, I need to display UI elements (forms) defined at runtime.
This seems like an ideal application for HTML and MSHTML (or the WebBrowser
control).

I'm looking for:
* Samples.  Does anyone know of a sample application which embeds MSHTML (or
WebBrowser) and uses ATL?
* How 'bout one using MFC?  (I'd rather leave MFC out of it, but if there's
something out there).
* Advice.  Should I use MSHTML directly?  Should I use WebBrowser?  What
factors might influence my choice?

This project will be developed using VC (6 or 7, haven't decided yet).

Any help appreciated!

-cd



Tue, 10 Aug 2004 08:48:16 GMT  
 Hosting MSHTML or WebBrowser
if you need to handle the event of a element such like click on a button,
you have to use MSHTML, this means you have to implement event sink. MFC has
a class CDHtmlDialog that can do what you want.

ZhangZQ



Quote:
> I'm starting a new project....

> In this project, I need to display UI elements (forms) defined at runtime.
> This seems like an ideal application for HTML and MSHTML (or the
WebBrowser
> control).

> I'm looking for:
> * Samples.  Does anyone know of a sample application which embeds MSHTML
(or
> WebBrowser) and uses ATL?
> * How 'bout one using MFC?  (I'd rather leave MFC out of it, but if
there's
> something out there).
> * Advice.  Should I use MSHTML directly?  Should I use WebBrowser?  What
> factors might influence my choice?

> This project will be developed using VC (6 or 7, haven't decided yet).

> Any help appreciated!

> -cd



Tue, 10 Aug 2004 14:53:05 GMT  
 Hosting MSHTML or WebBrowser
See ATLBrowser, WalkAll, Driller samples.

MS does not recommend direct MSHTML hosting except in certain restricted
situations. Those include UI-less parsing, as in WalkAll, and showing
HTML that lacks any links and does not require any navigation to be
performed, as in ShowHTMLDialog. MSHTML does not itself implement
navigation and hyperlinks.

Also IIRC MSHTML shipped with IE4 and 5 supports only one load operation
during its lifetime. To load a second page, you need to release old and
create new MSHTML instance, which is what WebBrowser does for every new
page.

Feel free to visit microsoft.public.inetsdk.programming.webbrowser_ctl,
my favorite hangout.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> I'm starting a new project....

> In this project, I need to display UI elements (forms) defined at
runtime.
> This seems like an ideal application for HTML and MSHTML (or the
WebBrowser
> control).

> I'm looking for:
> * Samples.  Does anyone know of a sample application which embeds
MSHTML (or
> WebBrowser) and uses ATL?
> * How 'bout one using MFC?  (I'd rather leave MFC out of it, but if
there's
> something out there).
> * Advice.  Should I use MSHTML directly?  Should I use WebBrowser?
What
> factors might influence my choice?

> This project will be developed using VC (6 or 7, haven't decided yet).

> Any help appreciated!

> -cd



Wed, 11 Aug 2004 00:59:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Access violation when destroying CAxWindow hosting MSHTML

2. Domain problems when hosting webbrowser with ATL

3. Hosting the WebBrowser Control using Visual C++/ATL does not work

4. Hosting WebBrowser inside ATL COM dll - Part 2

5. Hosting WebBrowser inside an ATL COM dll

6. Hosting WebBrowser control problem.

7. Hosting a WebBrowser Control inside an activeX ?

8. hosting WebBrowser

9. Hosting WebBrowser control in ATL CAxWindow

10. HELP: hosting WebBrowser control

11. Hosting a WebBrowser Control inside an activeX ?

12. Changing Error Msgs while Hosting Webbrowser Control...

 

 
Powered by phpBB® Forum Software