How to Implement Screen Rotation (Windows Embedded CE 6.0)

1/6/2010

Windows Embedded CE supports screen rotation so that you can rotate the content of the screen in increments of 90 degrees. By using screen rotation functionality, you can develop applications designed for both portrait and landscape orientation.

Rotation changes the orientation of the screen, hence it is the responsibility of the OEM or IHV to test the target device in both portrait and landscape orientation to ensure a consistent user experience, particularly in conjunction with user applications, dialog resources and message boxes, Software Input Panels (SIPs), Input Methods (IMs), and ClearType fonts.

Screen rotation is currently supported only on target devices that use a single screen and it is not supported on multiple screen target devices. Currently the two applications that respond to screen rotation are the taskbar and the shell. When a screen rotation occurs, the cursor and mouse automatically realign themselves to the new screen orientation.

Note that screen rotation can be implemented only if the display driver supports screen rotation. If you want to use your own display driver and not the one available in the Platform Builder catalog, you must make sure that your display driver is enabled to implement screen rotation. For more details about changes to your display driver to enable screen rotation, see topic Screen Rotation.

This procedure takes you through the steps necessary to implement screen rotation on a Windows Embedded CEā€“based device.

Hardware and Software Assumptions

Steps

Step Topic

1. Use the Windows Embedded CE OS Design Wizard to select a design template and the initial components for the OS design.

Make the following choices in the Windows Embedded CE OS Design Wizard:

  • Name the OS design ScreenRotation.
  • From the Available BSPs list, choose CEPC: x86.
  • From the Available design templates list in the OS Design Wizard, choose the PDA Device design template. In the Variants step, choose Mobile Handheld.

Creating an OS Design with the Windows Embedded CE OS Design Wizard

2. Make the registry changes.

Screen Rotation Registry Settings

3. Create a project for the screen rotation application.

Creating a Project for the Screen Rotation Application

4. Choose a Release configuration to target when Platform Builder builds the OS design into a run-time image.

To use the kernel debugger, make sure that support for the kernel debugger is enabled.

Levels of Debugging Support

Building a Run-Time Image From a Release Configuration

5. If you expect the size of either the debug or the release run-time image to exceed 32 MB, enable support for a large run-time image in the settings for the OS design.

Ee499095.note(en-US,WinEmbedded.60).gifNote:
Debug run-time images are typically larger than release run-time images. If you choose a debug configuration and the OS design contains many features, it is likely that the size of the run-time image will exceed 32 MB.

Enabling a Run-Time Image Size Larger Than 32 MB

6. Build the OS design into a run-time image.

Building a Run-Time Image

7. In the Output window, on the Output tab, verify that the build contains no errors.

Build Error Debugging Process

8. Choose a download service appropriate for the connection hardware. The download service will download a run-time image to the CEPC.

Download Service Selection

9. Set up and configure the connection hardware required for the download service. That hardware connects the CEPC to the development workstation, on which Platform Builder is installed. Examples of connection hardware include cables, a hub, or Ethernet network adapters.

Hardware Configuration

10. If you selected Serial Download Service in step 8, configure the HyperTerminal terminal emulation application to display the serial debug output from the serial port on the CEPC.

This configuration requires a null-modem cable connected to a serial port, such as COM1.

Configuring HyperTerminal for BSPs

11. Turn on the CEPC so that it becomes active on the Ethernet network or over the serial connection, and Platform Builder can discover it.

Not applicable

12. Configure the connection to the CEPC.

Choose the appropriate topic based on whether the development workstation and the CEPC are connected by an Ethernet network or a serial port connection.

Configuring an Ethernet Remote Connection

Configuring a Serial Remote Connection

13. Download the run-time image to the CEPC through the configured connection.

Downloading a Run-Time Image to a CEPC

14. Run the application and verify the screen rotation.

To execute the sample application on the CEPC, right-click the Start button and choose Run. Type ScreenRotationProj and choose OK. Verify that the screen has rotated by 90 degrees.

Each time you run the ScreenRotationProj program, the screen will rotate by 90 degrees.

Not applicable.

See Also

Concepts

Rotating the Contents of the Screen

Other Resources

GWES OS Design Development
Screen Rotation
Display Driver Registry Settings