i've create a background service (exe/console program) which draw to screen using CWsScreenDevice and other related classes. however, there are two problems:
1. how to detect the rotation of screen? currently, if the exe start when screen is portrait, it will always draw in a portrait resolution (240x320) even the screen is rotated (such as by the sensor in N82)
2. how can i force the screen device always use portrait (240x320) even the sensor is on? It is easy to do with CAknAppUi or CAknViewAppUi but hard in exe?
I tried using the methods in CWsScreenDevice and the only thing I can do is to force it run in 240x320 but screen is 320x240. that means, the only visible is the upper left corner 240x240.
I want to do it such that:
1. the drawing will always on portrait screen
2. even the system screen is rotated while my exe is running,
a) my exe still run full screen in 240x320
b) the screen won't go blank for a second.
thanks a lot for your help.