MSHTML IHTMLElementRender.DrawToDC() question

I'm using the mshtml's IHTMLElementRender interface to render webpages into thumbnail images, however I've noted some odd behaviour about the DrawToDC() function. It does not seem to render gradient/opacity filters/styles on items in the html object. 

Is there a setting in this interface or the IHTMLElement I cast from that I'm missing somewhere

An example of this issue if you have a program rendering html into images this way can be seen if you try and render http://www.microsoft.com or http://search.msn.com/. Parts of the page will be missing you compare the image output with IE's output.

I can also provide interested parties a sample program reproducing this issue if they want to help me figure out what the solution is.



Answer this question

MSHTML IHTMLElementRender.DrawToDC() question

  • Harold1000

    Where do you have the sample program avaiable

  • Johan Traa

    Hello

    I am facing one more problem, when I use it to draw HTML elements like Table etc. to a image (instead of full body) many times the image is not proper or is just a black block of the element size, what can be wrong. I am using a combination of Image and GDI32 APIs to generate and save the rendered image to file as bitmap.

    Thank you in advance for your time and help



  • MSHTML IHTMLElementRender.DrawToDC() question