Find method

Find method returns file object’s name at the specified "hide list" index.  

LONG Find(
 BSTR strFileName

Parameters strFileName     [in] Null-terminated OLE string that specifies the name of the hiding object, such as file, directory or hiding mask.
Return Values
  If the function succeeds, the return value is zero-based index of necessary file object item. Otherwise, the return value is -1.

Code Example

/// we would like to find Notepad.exe in the "hide list".

extern CHideMyFoldersAx m_ctrlHMFAx;

CString strFileName("c:\windows\notepad.exe");

long lFoundIndex = -1;

lFoundIndex = m_ctrlHMFAx.Find((LPCTSTR)strFileName);

if(lFoundIndex != -1)

// notepad.exe was found


// notepad.exe wasn’t found

See also