Control Panel Applet Framework

 Download Source Code and Example

The Windows Control Panel is the ideal way to allow a user to alter settings for an application that runs in the background, or automatically. But what are control panel applets and how do you write one? Well, after some exploring in the MSDN I discovered that control panel applets are just standard DLLs with a particular set of entry points and a .cpl extension. Place such a file in the Windows System directory and the next time you start up control panel your applet will be there. Having discovered what I needed to know I set about writing a control panel applet and once I'd done that, I turned the bulk of the code into a mini applet framework so I wouldn't have to write it ever again!

To implement your control panel applet all you need to do is the following:
  • include "ControlApplet.hpp" and publicly derive a class from CJBControlPanelApplet.
  • call the CJBControlPanelApplet constructor and pass resource IDs for the applet's icon, name and description.
  • implement the pure virtual function OnDoubleClick() - this is where your applet becomes live and can display a dialog or whatever.
  • create an instance of your applet class at global scope.
  • link with ControlApplet.cpp and include ControlApplet.def in your project. ControlApplet.cpp gives you the implementation of CJBControlPanelApplet and suitable DllMain() and CPlApplet() DLL entry point functions.

So that this article and code can be kept up to date more easily I've provided a link to where the article is located on my own web pages. Read the full article and download the source code.

Last updated: 27 June 1998



Comments

  • Win 2000 and XP

    Posted by Legacy on 07/14/2002 12:00am

    Originally posted by: V-man

    Do any of you guys know how to get a control panel applcaition working in win2000 and XP?

    I'm having trouble with mine. Is this project working for you?

    V-man

    Reply
  • links is not dead

    Posted by Legacy on 02/18/2002 12:00am

    Originally posted by: Bob Thiry

    http://www.jetbyte.com/portfolio-showarticle.asp?articleId=11&catId=1&subcatId=2

    Reply
  • The download link is dead!

    Posted by Legacy on 02/11/2002 12:00am

    Originally posted by: Bug Alert

    Damn it.

    Reply
  • ControlPanel and MFC

    Posted by Legacy on 06/09/1999 12:00am

    Originally posted by: Michael Knoke

    The Framework for ControlPanel Applets works great, but
    I'm not able to make a ControlPanel DLL which uses MFC
    CPropertySheet.
    Each time I'm executing the ControlPanel it opens and
    shows the PropertySheet, but I get immediately a dialog
    window "Control Panel failure..." and a OK button to quit.

    The modal loop from CPropertySheet gets a wrong message
    (message pointer 0x00000038).

    What's wrong.. Has somebody an example?

    ciao..

    Michael

    Reply
  • add app into "keyboard" of control panel

    Posted by Legacy on 03/08/1999 12:00am

    Originally posted by: leaval wang

    Hi , i am leaval wang . i am in China . i met a question about control panel applet . i have written a program whose function is definition of hotkey , and i want to put it into "keyboard" of control panel , likely server it as a property page of "keyboard". would you give me some advice. thank you.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Today's agile organizations pose operations teams with a tremendous challenge: to deploy new releases to production immediately after development and testing is completed. To ensure that applications are deployed successfully, an automatic and transparent process is required. We refer to this process as Zero Touch Deployment™. This white paper reviews two approaches to Zero Touch Deployment--a script-based solution and a release automation platform. The article discusses how each can solve the key …

  • On-demand Event Event Date: December 18, 2014 The Internet of Things (IoT) incorporates physical devices into business processes using predictive analytics. While it relies heavily on existing Internet technologies, it differs by including physical devices, specialized protocols, physical analytics, and a unique partner network. To capture the real business value of IoT, the industry must move beyond customized projects to general patterns and platforms. Check out this webcast and join industry experts as …

Most Popular Programming Stories

More for Developers

RSS Feeds