I would like to use the wx.IEHtmlWindow to render a webpage and then save it to a wx.Bitmap. I thought I could scroll the wx.IEHtmlWindow, take screenshots and assemble the individual parts in the end. Scrolling the wx.IEHtmlWindow does not seem to be possible, and even if it was, it would be a very awkward solution.
Someone posted the following article on Usenet:
"You can print your invisible WebBrowser, but substitute memory
compatible DC ( mem_dcPrint) instead of real Printer's DC.
m_pBrowser->Print(&mem_dcPrint,0);
After that you can copy (using BitBlt) an image from this mem_dcPrint
DC to another memory compatible DC with selected compatible BitMap.
This solution definitely works, I have tested it."
I would like to use the wx.IEHtmlWindow to render a webpage and then save it to a wx.Bitmap. I thought I could scroll the wx.IEHtmlWindow, take screenshots and assemble the individual parts in the end. Scrolling the wx.IEHtmlWindow does not seem to be possible, and even if it was, it would be a very awkward solution.
Someone posted the following article on Usenet:
"You can print your invisible WebBrowser, but substitute memory
compatible DC ( mem_dcPrint) instead of real Printer's DC.
m_pBrowser->Print(&mem_dcPrint,0);
After that you can copy (using BitBlt) an image from this mem_dcPrint
DC to another memory compatible DC with selected compatible BitMap.
This solution definitely works, I have tested it."
Is that approach possible with wxPython?
Interesting, but I expect that the Print method used is one provided by MFC wrappers for the browser control. Since there is no MFC involved in our case then there isn't a way to do it currently.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!