This is quite an interesting issue. I debugged it on Win 7 64 Bit down into comctl32.dll ListBox_DirHandler
assembler code and found out that Windows is doing something like this (just some simplified code):
// attr is the low word of the parameter passed to CComboBox::Dir.
attr &= FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL;
attr |= FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_READONLY;
WIN32_FIND_DATA finddata;
FindFirstFile(..., &finddata)
while(...) {
if(finddata.dwFileAttributes == FILE_ATTRIBUTE_COMPRESSED)
finddata.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
if(finddata.dwFileAttributes & attr) {
// some more checks and then might add the file name to the control;
}
FindNextFile(..., &finddata);
}
The problem is that your file is returned with finddata.dwFileAttributes==FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
. At entry of the function attr is changed so that it can never have FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
set, so the if inside the loop will never be true and the file name never be added to the control.
Sorry, but as far as I can see you will have to wait for an MS bugfix or do the work yourself.