Advertisement

Alt-Tab

Started by December 01, 2000 11:57 PM
1 comment, last by vbisme 24 years, 1 month ago
How do I detect when the gamer presses Alt+Tab to task my game, which the surfaces will be lost. And what do I need to do to restore it? Please give code examples.
If a DX function you call on a surface returns DDERR_SURFACELOST, then the memory associated with that surface was lost, and you have to call Restore on it. The DX SDK samples provide ample sample code for this.
Advertisement
You could respond to WM_ACTIVATEAPP to find out when the program is being minimized or restored, and from there restore your surfaces or set your game state to PAUSED or whatever you need to do.

Edited by - Qoy on December 2, 2000 2:59:40 AM

This topic is closed to new replies.

Advertisement