The following problems may occur in Microsoft Windows Mobile 2003 Second Edition software for Pocket PC when you try to use a Microsoft Windows Mobile-based Game API (GAPI) application in landscape mode:
A GAPI application may start in portrait mode when you may expect the application to start in landscape mode.
A GAPI application that does not fill the whole screen may cause corruption of the title bar and of the menu bar in landscape mode.
If an application is built by using the Windows Mobile 2003 SDK or earlier versions, GAPI forces the device into portrait mode when the GXOpenDisplay function is called. This is because earlier applications expect the device to be in portrait mode. There is no direct way to create a new GAPI application that supports landscape mode.
The GXSetViewport API for GAPI does not actually set up a rectangular viewport. The GXSetViewport API sets up a horizontal band that stretches across the screen. This is not a problem for portrait-mode applications. However, in landscape mode, that band intersects parts of the title bar and parts of the menu bar. The GXSetViewport API does not work on all devices in landscape mode. Specifically, the GXSetViewport API does not work on those devices that do not have a standard framebuffer.
To prevent your application from being forced into portrait mode, try the following:
Query the original orientation and then remember the original orientation by calling the ChangeDisplaySettingsEx(NULL,&devMode,NULL,CDS_TEST,NULL) function.
Call the GXOpenDisplay function.
Set the orientation back to its original state by calling the ChangeDisplaySettingsEx(NULL,&devMode,NULL,CDS_RESET,NULL) function.
To prevent corruption of the title bar and the menu bar when your GAPI application does not fill the whole screen, do not use viewports in landscape mode. Alternatively, you can use Graphics Device Interface (GDI).
Microsoft has confirmed that this is a problem in Windows Mobile 2003 Second Edition software for Pocket PC.