Search a windows folder adding any filenames that match a specified file filter to an output string. Options specify whether or not subfolders are to be recursively searched and whether or not path and file extension are to be included with file name.
int GetFilenamesInFolder( string & strListOfFilenames, LPCSTR lpcstrPath = "", LPCSTR lpcstrFileFilter = "", BOOL bRecursive = FALSE, UINT wDisplayOptions = GFIF_FILE_WITH_PATH )
Returns GFIF_NO_ERROR on success or an GFIF warning or error code on failure.
EX1
int GetFilenamesInFolder_ex1() { string strTemplateFileList; GetFilenamesInFolder(strTemplateFileList, "", "*.otw", FALSE, 3); return 0; }
origin.h