HomeSign in to retrieve your license keys and product download information.
 

 

  Products     SftDirectory 2.5     New Features     Free Trial     Support     Purchase     Web-based help file (loads quickly but is less complete than the product's online help file)
 
 

Frequently Asked Questions

Q:  SftDirectory returns an empty Path property for the Desktop.  How can I find the path for the Desktop?

The Desktop shown in the directory list is not the same as the Desktop directory.  The physical location is usually something like C:\Documents and Settings\username\Desktop.  The Desktop directory is a physical location with a path.  You can retrieve its location using the Windows SHGetFolderPath API.  The Desktop shown in the directory list is not a real location, it is a purely virtual folder.  For that reason the Path property will always be empty (as there is no physical location).  ItemIDList is also empty as it is not a locatable item.  It is only shown for the SftDirectory styles (ControlStyle) styleSftDirectoryTreeView and styleSftDirectoryComboBoxTreeView.  The Desktop is always the first item, making it easily recognizable by its position (its index is 0) or if you only have a folder object (SftDirectoryFolder) you can test it like this:

    Dim AFolder As SftDirectoryFolder
    Set AFolder = SftDirectory1.Selection(0) ' any folder
    If AFolder Is SftDirectory1.FolderList(0) Then
        ... it's the Desktop
    End If

Q:  How do I list files with just one extension like *.gif and hide all others?

The Filtering event can be used to trim down the default display, which displays all files and directories. Here is a sample in VB:

Private Sub Form_Load()
    SftDirectory1.InitialFolder = "C:\"
End Sub

Private Sub SftDirectory1_Filtering(_
Folder As SftDirectoryLib20.ISftDirectoryFolder, _ RemoveFolder As Boolean) If Folder.Type = typeSftDirectory_Fs_File Then ' list only *.gif If LCase(Right(Folder.Path, 4)) <> ".gif" Then Debug.Print Folder.Path & " suppressed" RemoveFolder = True End If End If End Sub

Q:  How do I use the Filtering event with Visual C++?

Here is a sample in C++, which displays just disk drives:

void CFullTreeViewDlg::OnFilteringSftdirectory1(
LPDISPATCH FAR* Folder, BOOL FAR* RemoveFolder) { ISftDirectoryFolderPtr pFolder = *Folder; if (pFolder->GetType() >= typeSftDirectory_Computer_Drive35 && pFolder->GetType() <= typeSftDirectory_Computer_Other) { ; // OK } else { *RemoveFolder = VARIANT_TRUE; } }

Q:  What could the reason be for forms with SftDirectory loading slowly.

If a folder with invalid shortcuts is displayed, SftDirectory will seem to load slowly as the Windows Shell retrieves non-existent icon images for the invalid shortcuts.  For example, if invalid shortcuts are present on the desktop (for example), it may seem that forms load slowly.  Removing the invalid shortcuts will correct the problem. These symptoms are only present if the Files property is set to True.

Home

 

Product Info

Overview

New Features

Web Help

Support

 

30-Day Free Trial

 

Purchase Now

 

Customer Info

My Account Login Required

License Keys Login Required

Download Products Login Required

Frequently Asked Questions