Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » How To » Downloads
 
Add your own
alternative version
Go to top

Enumerate and Host Control Panel Applets using C#.

, 15 Feb 2004
Demonstrates how to enumerate and host Windows Control Panel Applets using C# and unmanaged C++.
appletviewer_demo.zip
AppletViewer.exe
AppletEngine.dll
AppletProxy.dll
appletviewer_src.zip
AppletEngine
AppletEngine.csproj.user
bin
Debug
AppletEngine.dll
obj
Debug
temp
TempPE
AppletProxy
Debug
Exports.def
AppletViewer
App.ico
AppletViewer.csproj.user
bin
Debug
AppletEngine.dll
AppletProxy.dll
Release
AppletEngine.dll
AppletProxy.dll
AppletViewer.exe
obj
Debug
temp
TempPE
Release
temp
TempPE
using System;

namespace AppletEngine
{
	/// <summary>
	/// Summary description for AppletMessages.
	/// </summary>
	public enum AppletMessages
	{
		Initialize = 1,
		/*  This message is sent to indicate CPlApplet() was found. */
		/*  lParam1 and lParam2 are not defined. */
		/*  Return TRUE or FALSE indicating whether the control panel should proceed. */

		GetCount = 2,
		/*  This message is sent to determine the number of applets to be displayed. */
		/*  lParam1 and lParam2 are not defined. */
		/*  Return the number of applets you wish to display in the control */
		/*  panel window. */

		Inquire = 3,
		/*  This message is sent for information about each applet. */
		/*  A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES. */
		/*  The developer must not make any assumptions about the order or dependance */
		/*  of CPL inquiries. */
		/*  lParam1 is the applet number to register, a value from 0 to */
		/*  (CPL_GETCOUNT - 1).  lParam2 is a far ptr to a CPLINFO structure. */
		/*  Fill in CPLINFO's IconResourceId, NameResourceId, InformationResourceId and AppletDefinedData fields with */
		/*  the resource id for an icon to display, name and description string ids, */
		/*  and a long data item associated with applet #lParam1.  This information */
		/*  may be cached by the caller at runtime and/or across sessions. */
		/*  To prevent caching, see CPL_DYNAMIC_RES, above.  */

		Select = 4,
		/*  The CPL_SELECT message has been deleted. */

		DoubleClick = 5,
		/*  This message is sent when the applet's icon has been double-clicked */
		/*  upon.  lParam1 is the applet number which was selected.  lParam2 is the */
		/*  applet's AppletDefinedData value. */
		/*  This message should initiate the applet's dialog box. */

		Stop = 6,
		/*  This message is sent for each applet when the control panel is exiting. */
		/*  lParam1 is the applet number.  lParam2 is the applet's AppletDefinedData  value. */
		/*  Do applet specific cleaning up here. */

		Exit = 7,
		/*  This message is sent just before the control panel calls FreeLibrary. */
		/*  lParam1 and lParam2 are not defined. */
		/*  Do non-applet specific cleaning up here. */

		NewInquire = 8
		/* Same as CPL_INQUIRE execpt lParam2 is a pointer to a NEWCPLINFO struct. */
		/*  A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES. */
		/*  The developer must not make any assumptions about the order or dependance */
		/*  of CPL inquiries. */
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Mark Belles
Software Developer (Senior)
United States United States
Senior Application Developer specializing in Windows desktop and network development.
 
Professional Experience
- B.S. of Computer Science (Graduated 2001 - PSU)
- Senior Application Developer (8+ yrs)
- Microsoft Certified Professional
 
Primary Interests
- C#, C++, HTML, Javascript
- XML, ASP.NET, Web Services, SOAP, UDDI
- Socket programming and anything network related
- Reflection, Serialization, and Plugin Frameworks
- Owner-drawn controls and GDI+ goodness

| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 16 Feb 2004
Article Copyright 2004 by Mark Belles
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid