Demo Control Panel Application | CodeGuru

Demo Control Panel Application

Environment: Win 9x/NT/2000 and Visual C++ 6 While not being very fancy, this application (called ControlPanel) is a small demonstration of how the real Windows Control Panel functions. When the Control Panel is launched, it looks for .cpl files in the Windows system folder. The .cpl files (called applets) are simple DLLs that export the […]

Written By
CodeGuru Staff
CodeGuru Staff
Jan 17, 2001
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Environment: Win 9x/NT/2000 and Visual C++ 6

While not being very fancy, this application (called ControlPanel) is a small
demonstration of how the real Windows Control Panel functions.

When the Control Panel is launched, it looks for .cpl files in the Windows
system folder. The .cpl files (called applets) are simple DLLs that export the CPlApplet
function. For each applet found, the Control Panel loads that DLL with the ::LoadLibrary
function call and then uses the GetProcAddress function to realize a pointer
to the CPlApplet function. For each applet, it calls the CPlApplet function by passing it different messages such
as CPL_INIT, CPL_INQUIRE etc. You can get help about different messages in the online help of
MSDN.

When the Control Panel calls the CPlApplet function with CPL_INQUIRE message, the .cpl file
returns a CPLINFO structure which holds information about that perticular applet such
as its name, icon, info tip etc. When the Control Panel applet is double-clicked by
the user, the CPlApplet function is called with the CPL_DBLCLK value. At this point,
the applet generally displays a dialog from which the user can interact with the
applet.

Downloads

Download demo project – 32 KB

Download source – 46 KB

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.