Share via


Using Applications in Landscape and Portrait Modes (Windows CE 5.0)

Send Feedback

You can ensure that an application works in both landscape and portrait modes if your application always checks the screen size by calling the GetSystemMetrics function. Once you determine the screen size, resize your application so that it fits on the screen.

For dialog boxes, you can create two different resource DLLs that contain the landscape and portrait versions of the same dialog box. After you check the screen size, you can load the appropriate DLL.

An OEM can create a custom build flag that includes the appropriate DLL for the size of the screen included in an OS design. In previous versions, Windows CE used the CPLMAIN_LP environment variable in this manner to determine whether to include landscape or portrait versions of Control Panel applications. As of Windows CE .NET 4.2, a custom build flag enables you to select resources for portrait views on quarter VGA (QVGA) displays. You can select this Catalog item in the Catalog at Shell and User Interface\User Interface\Quarter VGA Resources – Portrait Mode.

See Also

Graphics, Windowing and Events

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.