Setting Brightness on a PocketPC

  • Thread starter Thread starter Boris Stoicov
  • Start date Start date
B

Boris Stoicov

Hi,


I have an apllication running on PocketPC 2003, and I want to be able to set
the brightness of the device through the application. For that purpose I
change the values of the registry keys containing the values for Brightness
and ACBrightness but it works just sometimes. Should I do anything else for
this to work all the time?
Any help will be appreciated!


Boris
 
Microsoft does not define API to control backlight, so there is really
no universal way to make it work on different devices.

If you limit your application to a specific model (or limited number of
models), try to consult the manufacturer or carrier whether any
backlight API is exposed.

Now back to your specific question. In SDK sample "MyBacklight", the
source code actually fires an event before the program is closed:

// Signal the driver that the backlight settings
// have changed so it reloads them from the registry
HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE,
_T("BackLightChangeEvent"));
if (hEvent != NULL)
SetEvent(hEvent);
CloseHandle(hEvent);

Not sure whether it helps, because this is used to control backlight
setting, not to adjust backlight on the fly.
 
Windows Mobile allow to change brightness through registry in a great deal
of devices, but some manufacturers are able to use it o replace it. So its
possible your device uses another way to do it, through api for example.
What kind of device you have?

Tell us something, regards
 
Back
Top