Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Thu May 08, 2008 11:42 am Post subject: HOWTO: Determine whether a item 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 ListItem class to determine whether a listitem is a 'special' item. For example, to determine whether an item is the 'Control Panel' , use the following code :
[VB6]
If fileVw.FirstSelectedItem.IsSpecialFolder(SpecialFolderTypes.Controls) Then
MsgBox ("Selected item is the 'Control Panel' ")
End If
[C++]
//For SpecialFolderTypes.CONTROLS, value = 3
if( m_filevw.GetFirstSelectedItem().IsSpecialFolder(3))
AfxMessageBox(_T("Selected item is the 'Control Panel' ")); |
|