Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!netcomsv!wolf From: wolf@netcom.COM (Buckskin Tech.) Newsgroups: comp.windows.ms.programmer Subject: Re: Does a window know when it is being overwritten? Message-ID: <1991May3.174333.6866@netcom.COM> Date: 3 May 91 17:43:33 GMT References: <59847@siemens.siemens.com> Sender: netnews@netcom.COM (USENET Administration) Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 19 Yes, it's true that it's possible for the window to be overwritten whenever you lose focus. Therefore, it's a good idea to snapshot any dislay data just before you lose focus. As for menus, there is a message (WM_INITMENUPOPUP) that is sent immediately before a menu is displayed. You can try using a WM_MEASUREITEM for each item in the menu about to be displayed to determine the area that will be obscured. You're really only allowed to write to your entire client area if you use the display context you get from Windows. The DCs you can get all go through the installed video driver. This driver expects to be aware of any and all changes being made to the display, and have veto power over every change. For hardware display updates, you'll probably need to have a special video driver that can accomodate the display from the coprocessor. There are some real-time video cards for Windows that use this technique, I believe. - Wolf