42Gears Speaks Driving Enterprise Mobility

22Feb/100

How to display Settings screens or Control Panel Applets in Windows Mobile?

Windows Mobile Control Panel applets are normal dlls renamed with special extension .cpl. They are actually loaded by ctlpnl.exe process.

Following code snipped is what you need if you want to show a Control Panel applet from your program. This way you make it easy for your user to change desired settings, without any “complex” navigation.

BOOL ShowControlPanelApplet(int id)
{
TCHAR szParams[32];
SHELLEXECUTEINFO execinfo = {0};
memset(&execinfo, 0, sizeof(execinfo));
execinfo.cbSize=sizeof(execinfo);
execinfo.lpFile=TEXT(“\\windows\\ctlpnl.exe”);
execinfo.lpVerb=TEXT(“open”);
// Id value determines which control applet will be launched
// For e.g. 23 for bluetooth applet
wsprintf(szParams, L”cplmain.cpl,%d”, id);
execinfo.lpParameters = szParams;
BOOL bRet=ShellExecuteEx(&execinfo);
return bRet;
}

The parameter id refers to the control panel applet that you want to show. Below is the table of id values and the corresponding applet names.

Control Panel Applet Id Values

1 Password
2 Owner Information
3 Power
4 Memory
5 About
6 Brightness
7 Screen
8 Input
9 Sounds & Notifications
10 Remove Programs
11 Menus
12 Buttons
13 Today
14
15 Beam
16 Clocks & Alarms
17 Configure Network Adapters
18 Regional Settings
19 Connections
20
21
22 Manage Certificates
23 Bluetooth
24 Error Reporting
25 GPS Settings
26
27 USB to PC

Follow us on Twitter http://twitter.com/42gears

Go to Home


1Sep/090

Windows CE and Windows Mobile for starters

Many a times I find myself in discussions on the history of Windows CE and Windows Mobile operating systems. Besides, if you have just started to work with Windows Mobile or Windows CE, its good to be aware of origins and basics of these operating systems.

Following is an attempt to sort those questions out. So here we go!

  • Microsoft launched Windows CE (code named Pegasus) in 1996
  • Previous attempts from Microsoft – WinPad (Win16) and Pulsar (Win32) projects (both canceled), Teams joined and became Pegasus.
  • Windows CE (now known as Windows Embedded) is a functionally scaled-down Windows operating system. It means it does lots of things like the desktop Windows but not all.
  • Designed from scratch for requirements of embedded and handheld devices (memory, CPU and power constraints). Although Windows CE has some functionality similar to desktop Windows but they are implemented completely differently.
  • CE kernel can run in under 1MB RAM
  • Windows CE is a highly customizable operating system. OEMs can pick and choose features or add new ones to their devices as per the requirements. For e.g. one Windows CE device can be a handheld with a display and a keyboard and another one can be a headless device without any display or keyboard.
  • Multithreading Support: Multithreading gives an illusion to running applications that all the system resources are available to it at all times. The illusion is a result of some intelligent time-sharing (also known as Scheduling) implemented in the operating system.
  • Pre-emptive scheduling between different priority levels and round-robin policy within a level.
  • Processor Support: Windows CE is supported on x86, ARM, SH3 ad MIPS based processors.
  • Difference between Windows Mobile and Windows CE: Windows Mobile is built on top of Windows CE kernel and subsystems. It is targeted at handheld devices with specific hardware and software features. OEMs are required to following strict guidelines (software and hardware) for developing their devices.
  • Windows CE supports Unicode only.

More later...

Go to Home