每个CPL的控制面板程序都是DLL,他们一般都在System32下面(2000/XP)<br>你用Delphi生成一个控制面板程序看看就明白了<br><br>CtlPanel.CPlApplet<br>function CPlApplet(hwndCPl: THandle; uMsg: DWORD; lParam1, lParam2: Longint): Longint;<br>var<br> Temp: Boolean;<br>begin<br> Result := 0;<br> Temp := True;<br> try<br> with Application, Application.Modules[lParam1] do<br> begin<br> FControlPanelHandle := hwndCPl;<br><br> case (umsg) of<br> CPL_INIT :<br> begin<br> DoInit(Temp);<br> Result := Integer(Temp);<br> end;<br> CPL_GETCOUNT:<br> begin<br> Result := ModuleCount;<br> DoCount(Result);<br> end;<br> CPL_STARTWPARMS :<br> begin<br> DoStartWParms(PChar(LParam2));<br> Result := 1;<br> end;<br> CPL_INQUIRE : DoInquire(PCplInfo(lParam2)^);<br> CPL_NEWINQUIRE : DoNewInquire(PNewCPLInfo(lParam2)^);<br> CPL_DBLCLK : DoActivate(LongInt(lParam2));<br> CPL_STOP : DoStop(LongInt(LParam2));<br> CPL_EXIT : DoExit;<br> CPL_SETUP : DoSetup;<br> end;<br> end;<br> except<br> Application.HandleException(Application);<br> Result := 1;<br> end;<br>end;