![]() |
|
QA: How to rotate the screen dynamically on Windows Mobile 2003 SE?
By Nicholas Tsipanov, May 28, 2004.
QuestionHow can I get what is current screen mode (portrait or landscape) from my program on Windows Mobile 2003 SE devices? I also wand to change it from my program. Is it possible? AnswerStarting with Windows CE 4.0 the DEVMODE structure got a new field: dmDisplayOrientation. With this field you can query or set the rotation mode. The values are DMDO_0 (not rotated), DMDO_90 (right-handed landscape mode), DMDO_180 (rotated upside-down) and DMDO_270 (left-handed landscape mode). To change the display orientation mode call ChangeDisplaySettingsEx: And to query the current mode use code: The devmode.dmDisplayOrientation will contain the current display orientation mode. Note that changes made using such calls are not persistent, after soft-reset display mode will return to the previous state. To make your changes permanent store them in registry. There are two values in registry under HKEY_LOCAL_MACHINE\System\GDI\Rotation key where the system takes its orientation mode on startup:
Related resources:DiscussDiscuss this article. Here you can write your comments and read comments of other developers. |
|||||||||||||||||||||