Should anyone out there have a need to do offscreen rendering to a Windows memory DC, I have managed to have some success doing so. The actual code I wrote is fairly tiny (less than 10 lines). What I basically do is "simulate" the update process for a window and create a rendering context that uses my memory DC instead.
It works reasonably well for my purposes. My only real problem is just that Mozilla appears to have no concept of "done" when rendering and so it's sometimes difficult to catch things when it's a good time to take a "snapshot".
As I said, it's a HACK, really and truly, but if anyone else out there would find it useful I'm more than happy to pass it along till there is a better solution.
Erik
I tried doing a similar thing a while ago. One of the problems I ran into was rendering plugin regions (flash,java, etc.). The problem was, as I recall that the ns plugin interface passes plugins a Windows native window handle, rather than a DC/region to render to.
If you've made any progress in this area, I would be very interested in discussing it further.
Best Regards,
Steve Williams Advance Software.
