Re: [GD-Windows] Windows paints my window!
Brought to you by:
vexxed72
From: Javier A. <ja...@py...> - 2002-09-11 09:59:42
|
Brian Sharon <bs...@mi...> wrote: > Who said you have to actually process the messages? :) From MSDN: > IsHungAppWindow [...] > Call PeekMessage when you update your progress bars and all should be > well. --brian Thanks guys, with either the hollow brush thing or the PeekMessage trick, the window is now fine. However, when we put PeekMessage inside our KeepAlive call (which we call frequently from various load functions), we got a nasty DirectX crash if we Alt-Tab repeatedly. Until now we had only been able to generate this crash in convoluted Ctrl-Alt-Del sequences... it bombs in the middle of a vertex buffer refill: Device was ok, Lock() call was ok, the vertex buffer memory was accesible, but somewhere in the middle of the vertex buffer fill loop, the vertex buffer memory is lost and the rep movsd crashes halfway. I was under the impression that the only way to lose the device when fullscreen was either by Ctrl-Alt-Del (which has special considerations and doesn't take away locked memory), or by actually processing messages and letting your app be deactivated. We PeekMessage with PM_NOREMOVE during load, don't actually process messages, and most certainly don't call that function inside the vertex buffer fill loops, so AFAIK the only effect this PeekMessage should have is to let windows know we're not dead. Will cross-post this to the DirectXDEV list and see what people think. [ Note: funny thing, the crash showed up when I was using Photoshop, had the color picker dialog up, and tried to set the game to fullscreen 640x480 resolution. For some reason, Photoshop's color picker will not let any other app go fullscreen 640x480 (any other resolution is fine). You can try it with the DX samples. Bummer. ] Javier Arevalo Pyro Studios |