How to capture toplevel offscreen windows output into a bitmap?

Yuri Borsky borsky at sbor.ru
Sat Mar 17 11:30:57 PDT 2007



Karol Gottan <gottan at op.pl> ÐÉÛÅÔ × ÓÏÏÂÝÅÎÉÉ:45F7095F.2050100 at op.pl...
> olivier.corrio at gmail.com pisze:
>
> > ok why not using wxWindowDC on windows ? maybe wxClientDC (but not
> > with decorations) on others platform. I suppose that it will work if
> > TLW is hidden.
>
> I have a working solution for Windows. Works ok.
>
> I am not sure however how to try to implement your wxClientDC
> suggestion, since hidden TLWs do not receive PAINT events AFAIK.
> Besides this, I need to capture the whole window with decorations.
> That's the point.
>
> I searched Google a lot without success :(. That's why I start to
> suspect it's not doable on X.

Hi Karol!

1) you may definitely do it in X11 - just use utility like xwpick and give
it your TLW's id.
unfortunately that means that you may somehow make sure that it is installed
on the customer's computer.
Also no sure about making it top first. Probably looking into xwpick's
sources would help?

2) If you move your TLW to X=-5000 as you propose elsewhere does not
guarantees that window is not visible in X11:
user may utilize virtual screen feature of window manager, in that case the
window will just pop somewhere like 5 screens to the left
of current one.










More information about the wx-users mailing list