Wie kann ich ein Programm in die Windows-Systemsteuerung integrieren?
Man muß eine Systemsteuerungs-Datei (Endung .cpl) erzeugen. Im Prinzip handelt es sich hier um eine DLL mit einer speziellen exportierten Funktion (CPLApplet). Seit Delphi 3 ist die Unit CPL.pas als Source vorhanden. Dort finden sich auch einige Hinweise bezüglich Registrierung beim System, hier ein Auszug. Ach ja, Delphi 4 (vielleicht auch 3 ?) kann mit der Compiler-Direktive {$E CPL) dazu angewiesen werden, eine Datei mit der entsprechenden Endung zu erzeugen.
{ General rules for being installed in the Control Panel: 1) The DLL must export a function named CPlApplet which will handle the messages discussed below. 2) If the applet needs to save information in CONTROL.INI minimize clutter by using the application name [MMCPL.appletname]. 2) If the applet is refrenced in CONTROL.INI under [MMCPL] use the following form: ... [MMCPL] uniqueName=c:\mydir\myapplet.dll ... The order applet DLL's are loaded by CONTROL.EXE is: 1) MAIN.CPL is loaded from the windows system directory. 2) Installable drivers that are loaded and export the CplApplet() routine. 3) DLL's specified in the [MMCPL] section of CONTROL.INI. 4) DLL's named *.CPL from windows system directory. CONTROL.EXE will answer this message and launch an applet WM_CPL_LAUNCH wParam - window handle of calling app lParam - LPTSTR of name of applet to launch WM_CPL_LAUNCHED wParam - TRUE/FALSE if applet was launched lParam - NULL CONTROL.EXE will post this message to the caller when the applet returns (ie., when wParam is a valid window handle)}
Delphi 1 | Delphi 2 | Delphi 3 | Delphi 4 |
nicht getestet | Version nicht betroffen | getestet |
siehe auch: