Author Topic: Draw HTML to DC - cool!  (Read 3991 times)

0 Members and 1 Guest are viewing this topic.

Offline Edwin Knoppert

  • Sr. Member
  • ****
  • Posts: 254
  • User-Rate: +11/-4
    • Hellobasic.com
Draw HTML to DC - cool!
« on: August 23, 2009, 05:19:47 PM »
Now this is cool!
You can simply obtain the IViewObject from the webcontrol and use it to draw the html to any DC you like.
This means it may be useful to create snapshots or print html as image in a preferred layout (guessing)

I haven't explored it yet bit it was something i wanted, QHTM was an alternative.

Here is the PureBasic code, maybe i rewrite this to PowerBASIC.. ever.. :)

http://www.purebasic.fr/english/viewtopic.php?t=38737&highlight=&sid=d0fff11adac6d154ee302532d75c65ea

I have included an exe and a PBDev project for brief peeking.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2483
  • User-Rate: +204/-0
Re: Draw HTML to DC - cool!
« Reply #1 on: August 23, 2009, 06:41:47 PM »
 
You can use the OleDraw function instead.

http://msdn.microsoft.com/en-us/library/ms692711%28VS.85%29.aspx

Offline Edwin Knoppert

  • Sr. Member
  • ****
  • Posts: 254
  • User-Rate: +11/-4
    • Hellobasic.com
Re: Draw HTML to DC - cool!
« Reply #2 on: August 23, 2009, 07:18:14 PM »
Nice!