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

  • Wednesday, September 24, 2014 8:00 AM - 9:00 AM PDT According to a recent Forrester Research report, many companies are choosing low-code platforms over traditional programming platforms, due to the speed with which low-code apps can be assembled and tested. With customer-facing applications on the rise, traditional programming platforms simply can't keep up with the "short schedules and rapid change cycles" required to develop these applications. Check out this upcoming webinar and join Clay Richardson from …

  • Learn how cloud-based master data management (MDM) empowers your fast-paced business to get the right data to the right place in real time, so you can remain competitive and agile.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds