Add an application to the Windows Mobile Control Panel

Source: Internet
Author: User
Tags exit

In Windows Mobile systems, users can access control Panel applications by setting them, and software developers can access some of the control Panel's information through the API functions provided by Windows Mobile, such as adding a control panel to the application.

The Control Panel application is implemented as a DLL, but it must have a CPL suffix, which exports a callback function:

LONG Cplapplet (HWND hwndcpl, UINT msg, LPARAM lParam1, LPARAM lParam2);

When the user clicks on the settings, the Ctlpnl.exe process sends some messages by calling Cplapplet, a CPL can support multiple control panel applet (applets):

Hwndcpl: Control Panel window handle, that is, the applet's parent window.

MSG: A message sent by the Control Panel program (Ctlpnl.exe) to our application that determines the application initialization, startup, stop, and exit, mainly including:

Cpl_init, Cpl_getcount, Cpl_newinquire, Cpl_idname, CPL_DBLCLK, Cpl_stop, Cpl_exit.

Cpl_init: Initializes the message, that is, Ctlpnl.exe notifies the Control Panel application to do some global initialization work, such as memory allocation.

Cpl_getcount: Gets the number of small programs supported by the Control Panel application.

Cpl_newinquire: Query The applet information for the Control Panel application. This information is contained in the NEWCPLINFO structure.

Cpl_idname: Get the name of the Control Panel application and change the location of the application in the Control Panel property page by setting the following registry key value.

[Hkey_local_machine\controlpanel\<id Name>].

"Group" = dword:1

Group value Settings tab where CPL exists
0 Personal
1 (default value) System
2 Connections

CPL_DBLCLK: This message indicates that the user clicked on the Control Panel application and can start a process here to complete the work accordingly.

Cpl_stop, Cpl_exit: Stop and exit messages, respectively.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.