CPL++ v1.1 - Control Panel Applets






4.09/5 (6 votes)
Mar 4, 2000

110649

1448
A freeware MFC class framework for developing Control Panel Applets.
Introduction
Welcome toCPL++
v1.1, An MFC class framework to encapsulate developing Control Panel Applets.
History |
Usage |
Contacting the Author |
History
V1.0 (18 July 1999)
- Initial public release.
V1.1 (20 November 1999)
- Now fully supports
CPL_INQUIRE
as well asCPL_NEWINQUIRE
messages. - Now supports a document template approach to creating applets. This means that you can easily support multiple applets per dll using the CPL++ framework.
- Demo program now supports demo'ing both static and dynamic applets.
- Control panel applet now always output as a ".cpl" file instead of a ".dll" file.
- Now supports displaying the specified property page (via the
CPL_STARTWPARMS
message) when a control panel applet is called via therundll32
command line.
Usage
To use CPL++ in your applets all you need to do is:
- Ensure your DLL has a DEF file and exports the sole function
CPlApplet
. Note: You do not need to write this function as it is provided internally by the CPL++ code. - Include cpl_pp.h and cpl_pp.h in your project (configured to produce a standard DLL including MFC either dynamically or statically).
- Derive a class from
CControlPanelApp
and override itsOnInit()
function. In it callAddApplet()
to add each applet you want. Normally, you would do this just once, but for demonstration purposes, the sample creates two applets. - Each applet you add should be an instance of the class
CControlPanelApplet
. It should be created on the heap. SeeCApp::OnInit()
for an example. Depending on which constructor you call, you will have created an dynamic (responds toCPL_NEWINQUIRE
) or static (responds toCPL_INQUIRE
) control panel applet. - The code is UNICODE enabled and UNICODE build configurations are provided for the test applet.
- For further information on developing and debugging control panel applets, please refer to the MSDN.
Contacting the Author
PJ Naughter
Email: pjn@indigo..ie
Web: http://www.naughter.com
20 November 1999