Share via


Using Applications in Landscape and Portrait Modes

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 a platform. 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. This feature is selectable from the Catalog at Shell and User Interface\User Interface\Quarter VGA Resources – Portrait Mode.

See Also

Customizing the User Interface

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.