Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help! Rendering Behaviour - IHtmlPainter

67 views
Skip to first unread message

Sophia Liu

unread,
Oct 19, 2000, 3:00:00 AM10/19/00
to
Hi,

Has anybody ever used IHtmlPainter to change the render behavior? I am
hoping to get the MSHTML to draw itself using DirectDraw, onto a
directdrawsurface.

I have downloaded the sample from
http://msdn.microsoft.com/Downloads/samples/Internet/ie55/RenderBehave/sampl
e.asp but could not get it compiled. Mshtml.h and mshtmlid.h are included
in the precompiled header as instructed. But I still got the following
errors...

d:\samplecodes\renderingbehaviors\downloads\samples\internet\browser\renderb
ehave\renderproject\behavior.h(20) : error C2504: 'IElementBehavior' : base
class undefined
error C2504: 'IHTMLPainter' : base class undefined
error C2065: 'IElementBehaviorSite' : undeclared identifier
error C2955: 'CComPtr' : use of class template requires template argument
list
e:\microsoft visual studio\vc98\atl\include\atlbase.h(563) : see
declaration of 'CComPtr'
fatal error C1903: unable to recover from previous error(s); stopping
compilation
Render.cpp
error C2504: 'IElementBehavior' : base class undefined
error C2504: 'IHTMLPainter' : base class undefined
error C2065: 'IElementBehaviorSite' : undeclared identifier
error C2955: 'CComPtr' : use of class template requires template argument
list
e:\microsoft visual studio\vc98\atl\include\atlbase.h(563) : see
declaration of 'CComPtr'
fatal error C1903: unable to recover from previous error(s); stopping
compilation
Generating Code...
Error executing cl.exe.

Render.dll - 20 error(s), 0 warning(s)

Thanks in advance for any help
Sophia


Sophia Liu

unread,
Oct 19, 2000, 3:00:00 AM10/19/00
to

To be more exact, I am looking into how I can get the html page render onto
a supplied DirectDraw surface or bitmp instead of onto a browser.

Am I looking into the right direction by investigating into MSHTML?

Sophia

"Sophia Liu" <sl...@oncable.com> wrote in message
news:OMGp4reOAHA.244@cppssbbsa04...

Thomas Goetz

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
Hi,

i have the same problem: I want to render a html-page to a D3D-surface or at
least to a bitmap. The IHtmlPainter-interface sounds interresting. But wait
a minute - it seems only to work in the wrong direction: i am not interested
in drawing to a webpage using a bitmap or a D3D-surface! I want to draw the
whole webpage to a D3D-surface or a bitmap! Do you see a way to do that?
Currently i use MSHTML to render to a bitmap using IViewObject::Draw ( just
like printing ), but that is complicated and slow - but it works. I don't
know if it works with a D3D-surface instead of a bitmap - can you tell me?

About your compiling problem: Have you included the header and libs of
ie5.5? And have you changed the order of the include- and lib-directories?
It is described at
http://msdn.microsoft.com/downloads/samples/internet/libraries/ie55_lib/samp
le.asp.

If you find a solution to our common problem, please let me know!

Thomas

"Sophia Liu" <sl...@oncable.com> wrote in message

news:u5B5xDf...@cppssbbsa02.microsoft.com...

Ken Netherland

unread,
Feb 4, 2022, 10:07:11 PM2/4/22
to
public unsafe void Draw(tagRECT rcBounds, tagRECT rcUpdate, int lDrawFlags, ref _RemotableHandle hdc, IntPtr pvDrawObject)
{
fixed (_RemotableHandle* phdc = &hdc)
{
IntPtr hdcDraw = (IntPtr) phdc;
var graphics = Graphics.FromHdc(hdcDraw);

graphics.FillRectangle(Brushes.Red, new RectangleF(rcBounds.left, rcBounds.top, rcBounds.right - rcBounds.left, rcBounds.bottom - rcBounds.top));
}
}
0 new messages