When writing DirectX applications, obviously it's desirable to support the user suspending the application via Alt-Tab in a way that's fast and error-free. What is the best set of practices for ensuring this? Things that need to be addressed include:
- The best methods of detecting when your application has been alt-tabbed out of and when it has been returned to.
- What DirectX resources are lost when the user alt-tabs, and the best ways to cope with this.
- Major things to do and things to avoid in application architecture for purposes of alt-tab support.
- Any significant differences between major DirectX versions as they apply to the above.
Interesting tricks and gotchas are also good to hear about.