Private Type CPLINFO
idIcon As Long
idName As Long
idInfo As Long
lData As Long
End Type
Private Declare Function CPlApplet_Desk Lib "desk.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_Intl Lib "intl.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_MMSys Lib "mmsys.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_Access Lib "access.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_AppWiz Lib "appwiz.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_InetCpl Lib "inetcpl.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_Telephon Lib "telephon.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_TimeDate Lib "timedate.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_TweakUI Lib "tweakui.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_mlcfg32 Lib "mlcfg32.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Declare Function CPlApplet_Main Lib "main.cpl" Alias "CPlApplet" _
(ByVal hwndCPl As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
Private Const CPL_INIT = 1
Private Const CPL_GETCOUNT = 2
Private Const CPL_INQUIRE = 3
Private Const CPL_SELECT = 4
Private Const CPL_DBLCLK = 5
Private Const CPL_STOP = 6
Private Const CPL_EXIT = 7
Private Const CPL_NEWINQUIRE = 8
Private ci As CPLINFO
Private Sub MainCplApplet(lParam1 As Long)
If CPlApplet_Main(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_Main hWnd, CPL_INQUIRE, lParam1, VarPtr(ci)
CPlApplet_Main hWnd, CPL_DBLCLK, lParam1, ci.lData
CPlApplet_Main hWnd, CPL_STOP, 0, ci.lData
CPlApplet_Main hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdAccessibility_Click()
If CPlApplet_Access(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_Access hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_Access hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_Access hWnd, CPL_STOP, 0, ci.lData
CPlApplet_Access hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdAddRemoveProg_Click()
If CPlApplet_AppWiz(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_AppWiz hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_AppWiz hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_AppWiz hWnd, CPL_STOP, 0, ci.lData
CPlApplet_AppWiz hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdDateTime_Click()
If CPlApplet_TimeDate(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_TimeDate hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_TimeDate hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_TimeDate hWnd, CPL_STOP, 0, ci.lData
CPlApplet_TimeDate hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdDial_Click()
If CPlApplet_Telephon(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_Telephon hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_Telephon hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_Telephon hWnd, CPL_STOP, 0, ci.lData
CPlApplet_Telephon hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdDisplay_Click()
If CPlApplet_Desk(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_Desk hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_Desk hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_Desk hWnd, CPL_STOP, 0, ci.lData
CPlApplet_Desk hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdInternet_Click()
If CPlApplet_InetCpl(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_InetCpl hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_InetCpl hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_InetCpl hWnd, CPL_STOP, 0, ci.lData
CPlApplet_InetCpl hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdKeyboard_Click()
MainCplApplet 1
End Sub
Private Sub cmdMail_Click()
If CPlApplet_mlcfg32(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_mlcfg32 hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_mlcfg32 hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_mlcfg32 hWnd, CPL_STOP, 0, ci.lData
CPlApplet_mlcfg32 hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdMouse_Click()
MainCplApplet 0
End Sub
Private Sub cmdMultimedia_Click()
If CPlApplet_MMSys(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_MMSys hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_MMSys hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_MMSys hWnd, CPL_STOP, 0, ci.lData
CPlApplet_MMSys hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdRegional_Click()
If CPlApplet_Intl(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_Intl hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_Intl hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_Intl hWnd, CPL_STOP, 0, ci.lData
CPlApplet_Intl hWnd, CPL_EXIT, 0, 0
End If
End Sub
Private Sub cmdTweakUI_Click()
If CPlApplet_TweakUI(hWnd, CPL_INIT, 0, 0) <> 0 Then
CPlApplet_TweakUI hWnd, CPL_INQUIRE, 0, VarPtr(ci)
CPlApplet_TweakUI hWnd, CPL_DBLCLK, 0, ci.lData
CPlApplet_TweakUI hWnd, CPL_STOP, 0, ci.lData
CPlApplet_TweakUI hWnd, CPL_EXIT, 0, 0
End If
End Sub
|