Printing a Frame

How do I obtain a bitmap/image representing the content of a Window?
I need to print the representation of a window.

···

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/

Are you looking for something beyond the print-screen key? If you press
alt-print screen, it will copie the active window to the clipboard.

From there, you can open an image editor and 'paste' and you should see

the window. If you press just print screen, it should copied everything
on the monitor. This key combo probably generates some specific event
if you needed to tie it in further.

Stryder

···

-----Original Message-----
From: Peter Damoc [mailto:pdamoc@gmx.net]
Sent: Friday, May 07, 2004 2:12 AM
To: wxPython-users@lists.wxwidgets.org
Subject: [wxPython-users] Printing a Frame

How do I obtain a bitmap/image representing the content of a Window? I
need to print the representation of a window.

--
Peter Damoc
Hacker Wannabe

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Peter Damoc wrote:

How do I obtain a bitmap/image representing the content of a Window?
I need to print the representation of a window.

Create a wx.WindowDC of the window and then Blit from there to a wx.MemoryDC with the bitmap selected into it. I don't remember off the top of my head if the wx.WindowDC will include child windows and window decorations, if not then use a wx.ScreenDC and just Blit from the position and size of the Frame.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

wx.ScreenDC was what I was looking for :smiley: Thanks!

···

On Fri, 07 May 2004 09:54:33 -0700, Robin Dunn <robin@alldunn.com> wrote:

Peter Damoc wrote:

How do I obtain a bitmap/image representing the content of a Window?
I need to print the representation of a window.

Create a wx.WindowDC of the window and then Blit from there to a wx.MemoryDC with the bitmap selected into it. I don't remember off the top of my head if the wx.WindowDC will include child windows and window decorations, if not then use a wx.ScreenDC and just Blit from the position and size of the Frame.

--
Peter Damoc
Hacker Wannabe