home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4840 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.3 KB

  1. Path: sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!ciit85.ciit.nrc.ca!brandonu.ca!dueck
  2. Newsgroups: comp.os.ms-windows.programmer.misc
  3. Subject: When to take a snapshot?
  4. Message-ID: <1993Jan7.141729.2931@brandonu.ca>
  5. From: dueck@brandonu.ca
  6. Date: 7 Jan 93 14:17:29 CST
  7. Organization: Brandon University, Brandon, Manitoba, Canada
  8. Lines: 21
  9.  
  10. I have an application that draws graphics in a window. I want to save the
  11. contents of the window across task switches so they can be restored when my
  12. application is reactivated. At what point should I take a snapshot of the
  13. screen? 
  14.  
  15. Some obvious answers present themselves. Upon receiving WM_ACTIVATE with
  16. wParam=WA_INACTIVE seems a good place. The problem is that if WM_ACTIVATE was
  17. generated as a result of ALT-TAB, there is a rectangular ALT-TAB window sitting
  18. on top of my window when the WM_ACTIVATE message is received. The snapshot then
  19. includes the ALT-TAB window. 
  20.  
  21. The same problem holds for WM_KILLFOCUS. 
  22.  
  23. Since some of the graphics drawn in the window manifest animation, it is not
  24. useful to consider a metafile approach to redrawing the window. 
  25.  
  26. I also do not wish to draw on a memory context and a device context at each
  27. grapics call. While this would maintain the necessary snapshot, I believe
  28. the performance hit would be unacceptable. 
  29.  
  30. I am still looking for a good answer to this problem.
  31.