To create a Silverlight for Windows Embedded control panel home page, include the SYSGEN_CTLPNL2 catalog item in your OS design. To add executable control panel items to this Silverlight control panel home page, you can add SYSGEN variables or you can directly add registry entries and relevant executable files to your OS design.

Add Executable Control Panel Items to a Control Panel Home Page

By default, your OS design includes the SYSGEN_CTLPNL2 catalog item. Registry entries are in the file %_WINCEROOT%\public\wceshellfe\oak\files\wceshellfe.reg and include the following lines to define the basic control panel home page:

;----------------------------start CONTROL PANEL 2 (Settings) ------------------------
; Main Navigation CPL
[HKEY_LOCAL_MACHINE\Software\Microsoft\Settings\{01608162-D728-4009-BDA4-3DB8585E577D}]
@="Settings main window"
"Title"="Settings main window"
"Type"=dword:2
 [HKEY_LOCAL_MACHINE\Software\Microsoft\Settings\{01608162-D728-4009-BDA4-3DB8585E577D}\SecureItems]

Windows Embedded Compact 7 includes a default executable control panel item for setting Wi-Fi options. To add this control panel item to your basic control panel home page, add the SYSGEN variable SYSGEN_WIFICPL to your OS design. When you build your OS design, the registry entries and the executable file for the executable control panel item are included in your run-time image. The following code is appended to the %_WINCEROOT%\public\wceshellfe\oak\files\wceshellfe.reg file:

"{2E54B5FC-6E98-4e30-AD3D-9617FE295F02}"=dword:50
; WiFi XML CPL
[HKEY_LOCAL_MACHINE\Software\Microsoft\Settings\{2E54B5FC-6E98-4e30-AD3D-9617FE295F02}]
        @="WiFi"
        "Title"=mui_sz:"WiFiCpl.exe,#400"
        "Type"=dword:1
        "Location"="\\windows\\WiFiCpl.exe"
        "Icon"=\\windows\\CtlPnl2_WIFI.png

The first line in the appended code gives the GUID of the executable control panel item that implements Wi-Fi options. The executable application is then included in the control panel home page, under the control panel home page registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Settings\{01608162-D728-4009-BDA4-3DB8585E577D}\SecureItems.

Similar to the basic control panel home page definition, the appended code further specifies a registry key for the GUID of the executable control panel application. This control panel application type is set to 1, which indicates that it is an executable control panel item. As the preceding code illustrates, for this type of control panel item, you must specify a title (string or string resource), the location of the executable file (.exe), and the location of an icon file (.png) to display in the control panel home page.

To build your OS, in Microsoft Visual Studio, on the Build menu, click Build Solution or Rebuild Solution. To download the run-time image to your device, with the device connected and selected in Visual Studio, on the Target menu, click Attach Device. To execute the basic control panel home page, on the Target menu, click Run Programs, and then select ctlpnl2.exe to run, or run the command at a command prompt. To do this in Visual Studio, on the Target menu, click Target Control, and then type s ctlpnl2. The basic control panel home page appears on your device, in addition to the Wi-Fi icon.

See Also