Article View: comp.os.ms-windows.programmer.misc
Article #2692When to take a snapshot?
From: dueck
Date: Thu, 07 Jan 1993 20:17
Date: Thu, 07 Jan 1993 20:17
21 lines
1393 bytes
1393 bytes
I have an application that draws graphics in a window. I want to save the contents of the window across task switches so they can be restored when my application is reactivated. At what point should I take a snapshot of the screen? Some obvious answers present themselves. Upon receiving WM_ACTIVATE with wParam=WA_INACTIVE seems a good place. The problem is that if WM_ACTIVATE was generated as a result of ALT-TAB, there is a rectangular ALT-TAB window sitting on top of my window when the WM_ACTIVATE message is received. The snapshot then includes the ALT-TAB window. The same problem holds for WM_KILLFOCUS. Since some of the graphics drawn in the window manifest animation, it is not useful to consider a metafile approach to redrawing the window. I also do not wish to draw on a memory context and a device context at each grapics call. While this would maintain the necessary snapshot, I believe the performance hit would be unacceptable. I am still looking for a good answer to this problem.
Technical Details
Message-ID:
<1993Jan7.141729.2931@brandonu.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!ciit85.ciit.nrc.ca!brandonu.ca!dueckShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!ciit85.ciit.nrc.ca!brandonu.ca!dueck Newsgroups: comp.os.ms-windows.programmer.misc Subject: When to take a snapshot? Message-ID: <1993Jan7.141729.2931@brandonu.ca> From: dueck@brandonu.ca Date: 7 Jan 93 14:17:29 CST Organization: Brandon University, Brandon, Manitoba, Canada Lines: 21