Opens a Control Panel item.
Note This function is not supported as of Windows Vista
- lpcszCmdLine [in]
Pointer to a string that contains the command line that opens the Control Panel item. This command line includes at least the name of the .cpl file. It can also contain any other necessary information such as the property sheet page within the item (either by ordinal or by name). For more information, see Executing Control Panel Items.
- hwndMsgParent [in, optional]
The handle of the parent window, used to display error messages about the opening of the item. This value can be NULL.
TRUE if the Control Panel item was opened successfully; otherwise, FALSE.
As of Windows Vista, this function always returns FALSE.
If the specified Control Panel item is already running, SHRunControlPanel attempts to switch to that instance rather than opening a new instance.
Example calls to SHRunControlPanel are shown here.
SHRunControlPanel(TEXT("timedate.cpl"), hwnd); SHRunControlPanel(L"appwiz.cpl", NULL); SHRunControlPanel(L"appwiz.cpl,2", NULL); SHRunControlPanel("desk.cpl,Settings", hwnd
Minimum supported client
|Windows XP with SP1 [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|
Build date: 11/28/2012