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