BCGControlBar Pro for MFC
virtual BOOL CBCGPRegistry::DeleteKey ( LPCTSTR  pszPath,
BOOL  bAdmin = FALSE 
)
virtual

Deletes the specified key and explicitly deletes all sub keys

Returns
If successful, returns nonzero; otherwise 0.

Removes the specified key from the registry and explicitly removes any sub keys. The function will fail if the object was created in read-only mode. If bAdmin is nonzero, the key to delete should be located under HKEY_LOCAL_MACHINE or under HKEY_CURRENT_USER otherwise.

Parameters
pszPathSpecifies the name of the key to delete
bAdminSpecifies the location of the key to delete