SAMPLE: Switching Between DirectDraw Window and Fullscreen Mode

Last reviewed: September 5, 1997
Article ID: Q159228
3.00 WINDOWS NT kbprg kbfile kbhowto

The information in this article applies to:

  • Microsoft DirectX 3 Software Development Kit, version 3.0 on the following platforms: Windows NT, Win95

SUMMARY

This sample demonstrates how to switch between DirectDraw non-exclusive windowed and exclusive fullscreen modes.

The following file is available for download from the Microsoft Software Library:

 ~ Win2full.exe (size: 103075 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

MORE INFORMATION

This sample code demonstrates the process of switching a DirectDraw app from windowed mode non-exclusive to fullscreen exclusive mode and back. The sample was written with Microsoft Visual C++ 4.1 and DirectX 3.0 SDK.

The process of switching from windowed mode and back requires the application to:

  • destroy all DirectDraw objects.
  • recreate each of those objects.
  • reinitialize all DirectDraw objects required for the specific app.

Execute DDSAMPLE.EXE to run the sample. Press the ESC key to quit or the ALT+ENTER keys to switch modes.


KBCategory: kbprg kbfile kbhowto
KBSubcategory: GdiDirectDraw
Additional reference words: 3.00 kbdsd DDraw
(entered under Fonts and Graphics Demos in Development Kits)
Keywords : GdiDirectDraw kbfile kbhowto kbprg
Technology : kbDirectXSDK
Version : 3.00
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.