Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Thu May 08, 2008 10:55 am Post subject: HOWTO: Determine whether a node is a 'special' folder such as the Control Panel, My Network Places, etc |
|
|
Special folders are folders such as My Computer, Control Panel, My Network Places, My Documents, Windows directory, etc. See the SpecialFolderTypes enumeration for a complete list of special folders.
Use the IsSpecialFolder method of TreeNode class to determine whether a node is a 'special' node. For example, to determine whether a node is the 'Control Panel' node, use the following code :
[VB6]
If folderView1.SelectedNode.IsSpecialFolder(SpecialFolderTypes.CONTROLS) Then
MsgBox "Selected node is the 'Control Panel' node
End If
[C++]
//For SpecialFolderTypes.CONTROLS, value = 3
if (m_fldrVw.GetSelectedNode().IsSpecialFolder(3))
AfxMessageBox(_T("Selected node is the 'Control Panel' node")); |
|