用如下的方法:
CreateProcess(_T("\\Windows\\ctlpnl.exe"), _T("cplmain.cpl,3"), NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
ctlpnl.exe:是控制面板管理程序
cplmain.cpl:是系统提供的控制面板组件,其实就是一个dll.
CreateProcess的第二个参数是这样的_T("*.cpl,X,Y"),Y可以忽略,忽略时是零。
You have to run ctlpnl.exe program with "cplmain.cpl,X,Y" argument where X is Id of the control panel applet and Y is an index of a tab page (most applets have several tabs).
// Determine if a window with the class name exists...
if (pWndPrev = CWnd::FindWindow(_T("HHTaskBar"),NULL))
{
// Get the child
pWndChild = pWndPrev->GetTopWindow();
HWND window = pWndChild->GetSafeHwnd();
::SendMessage(window,WM_LBUTTONDBLCLK,0x00000001,0x000D000A);
}