Share via


CPlApplet

Send Feedback

The CPlApplet function is an application-defined callback function that serves as the entry point for a Control Panel application. The APPLET_PROC type defines a pointer to this callback function.

Syntax

LONG APIENTRY CPlApplet(
  HWND hwndCPl,
  UINT msg,
  LPARAM lParam1,
  LPARAM lParam2
);

Parameters

  • hwndCPl
    Identifier of the main window of the controlling application. Use the hwndCPl parameter for applications or other windows that require a handle to a parent window.
  • msg
    Message being sent to the Control Panel application; one of the Control Panel Messages.
  • lParam1
    Additional message-specific information.
  • lParam2
    Additional message-specific information.

Return Values

The return value depends on the message.

Remarks

When the Control Panel starts, it loads all DLL files that have a .cpl file name extension (such as MyApplet.cpl) in the Windows folder. The Control Panel calls the CPlApplet function that was implemented and exported in each CPL file. The CPlApplet function must properly handle any of the Control Panel Messages that are sent to it programatically or via calls from the Control Panel.

If more than one Control Panel application is implemented in a .cpl file, a single CPlApplet function is used for all of the applications.

Example

The Windows Mobile Version 5.0 Pocket PC SDK ships with a code sample called My Backlight. It demonstrates how to use the CPlApplet function. By default, it is located at C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Mybacklight\.

Requirements

Pocket PC: Pocket PC 2000 and later
Smartphone: none
OS Versions: Windows CE 3.0 and later
Header: cpl.h

See Also

Control Panel Messages | Control Panel Structures

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.