这是windows mobile sdk 6里面的例子,位于:
C:/Program Files/Windows Mobile 6 SDK/Samples/PocketPC/CPP/win32/myBackLight
原文如下:
Code Sample Name: myBackLight
Feature Area: Shell
Description:
This project demonstrates how to create a simple control panel applet for a
Windows Mobile-based Pocket PC device.
Note: This sample does not actually control the backlight, it simply
illustrates how a control panel applet is implemented.
Relevant APIs:
CPlApplet
Usage:
Load and deploy the project in Visual Studio 2005. The resulting file,
myBackLight.cpl, will be deployed to the /Windows directory. To view the CPL
in Start:Settings, you may need to reset the device.
Control panel applets can be started programmatically. The format of the
command is:
'/Windows/ctlpnl.exe cpl_filename.cpl,applet_name,applet_index,tab_index'
You can configure Visual Studio 2005 to debug this sample automatically on
the device after you build it by following these steps:
1. Select Properties from the Project menu.
2. Select Debugging from the Configuration Properties tree.
3. For Remote Executable, specify "/Windows/ctlpnl.exe".
4. For Command Arguments, specify "myBackLight.cpl".
5. Select OK to save your changes. Press F5 to begin debugging.
Assumptions:
None.
Requirements:
Visual Studio 2005,
Windows Mobile 6 Professional SDK
** For more information about this code sample, please see the
Windows Mobile SDK help system. **
这是我在做双摄像头驱动中遇到需要切换摄像头的系统设置问题,在windows mobile的设置里面添加一个控制图标,编写一个修改注册表的程序,实现前后摄像头的切换。
此例子很简单,编译出来就是一个myBackLight.cpl的程序,可以在模拟器中运行,也可以直接复制到智能机的/windows目录中,重启机器就可以了。在设置里面即可多出一个新的图标。