WebBrowser2

D

Dave R

HI everyone, this is my first post, so please excuse me if it's already been
answere. I am a C++ developer and I have hosted the WebBrowser2 component in
my own application. I have managed to get the webbrowser component to render
and entire web page via the draw function of the IViewObject class. When you
draw to a metafile device context, with the Draw method of the IViewObject,
it seems as though the rendering is a bitmap placed into an EMF. This isn't
always the case, but it seems to depend on the content. The alternate
approach I tried was to get the pBody element and use the rendering facilty
of the element. That will always produce a true EMF with vector components,
however, it seems to be restricted to the height of the display. If you were
in 800 x 600 mode, you would get an EMF that was clipped at 600 high. I
deally I would love to get the IViewObject to render a true vector based EMF
if possible. I am not sure why the internal decision is made as render a
bitmap to the metaDC other then, the entire process is double buffered and
blitted to the destination DC. Any help on this would be really apprecitated.
 
A

Alvin Bruney - ASP.NET MVP

strange as this may sound, you may get more help with this issue on the
csharp newsgroups since they regularly deal with the browser control.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Dave R said:
HI everyone, this is my first post, so please excuse me if it's already been
answere. I am a C++ developer and I have hosted the WebBrowser2 component in
my own application. I have managed to get the webbrowser component to render
and entire web page via the draw function of the IViewObject class. When you
draw to a metafile device context, with the Draw method of the IViewObject,
it seems as though the rendering is a bitmap placed into an EMF. This isn't
always the case, but it seems to depend on the content. The alternate
approach I tried was to get the pBody element and use the rendering facilty
of the element. That will always produce a true EMF with vector components,
however, it seems to be restricted to the height of the display. If you were
in 800 x 600 mode, you would get an EMF that was clipped at 600 high. I
deally I would love to get the IViewObject to render a true vector based EMF
if possible. I am not sure why the internal decision is made as render a
bitmap to the metaDC other then, the entire process is double buffered and
blitted to the destination DC. Any help on this would be really
apprecitated.
 
D

Dave R

Alvin,

Thanks for your response. I'll try over in the C# forum.

Dave


Alvin Bruney - ASP.NET MVP said:
strange as this may sound, you may get more help with this issue on the
csharp newsgroups since they regularly deal with the browser control.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Dave R said:
HI everyone, this is my first post, so please excuse me if it's already been
answere. I am a C++ developer and I have hosted the WebBrowser2 component in
my own application. I have managed to get the webbrowser component to render
and entire web page via the draw function of the IViewObject class. When you
draw to a metafile device context, with the Draw method of the IViewObject,
it seems as though the rendering is a bitmap placed into an EMF. This isn't
always the case, but it seems to depend on the content. The alternate
approach I tried was to get the pBody element and use the rendering facilty
of the element. That will always produce a true EMF with vector components,
however, it seems to be restricted to the height of the display. If you were
in 800 x 600 mode, you would get an EMF that was clipped at 600 high. I
deally I would love to get the IViewObject to render a true vector based EMF
if possible. I am not sure why the internal decision is made as render a
bitmap to the metaDC other then, the entire process is double buffered and
blitted to the destination DC. Any help on this would be really
apprecitated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top