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

  • Savvy enterprises are discovering that the cloud holds the power to transform IT processes and support business objectives. IT departments can use the cloud to redefine the continuum of development and operations—a process that is becoming known as DevOps. Download the Executive Brief DevOps: Why IT Operations Managers Should Care About the Cloud—prepared by Frost & Sullivan and sponsored by IBM—to learn how IBM SmartCloud Application services provide a robust platform that streamlines …

  • Hybrid cloud platforms need to think in terms of sweet spots when it comes to application platform interface (API) integration. Cloud Velocity has taken a unique approach to tight integration with the API sweet spot; enough to support the agility of physical and virtual apps, including multi-tier environments and databases, while reducing capital and operating costs. Read this case study to learn how a global-level Fortune 1000 company was able to deploy an entire 6+ TB Oracle eCommerce stack in Amazon Web …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds