Problems may occur when you use a GAPI application in landscape mode in Windows Mobile 2003 Second Edition software for Pocket PC
This article has been archived. It is offered "as is" and will no longer be updated.
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.
Microsoft has confirmed that this is a problem in Windows Mobile 2003 Second Edition software for Pocket PC.
Article ID: 843485 - Last Review: 12/08/2015 07:34:03 - Revision: 1.0
Microsoft Windows Mobile 2003 software for Pocket PC Standard Edition
- kbnosurvey kbarchive kbtshoot kbprb KB843485