Click to See Complete Forum and Search --> : CListBox::Dir()


jteagle@home
April 11th, 1999, 08:13 AM
Why can't CListBox's (and presumably CComboBox's) Dir() method handle long filenames? If you supply a long filename for the lpszWildCard parameter it doesn't find any files, you have to supply a short filename. It also lists files it finds in short form. Surely under WIN32 it should be able to do this? I don't understand what the point of supplying a control under WIN32 with WIN16-only capabilities is.

If I use GetShortPathName() to supply it with a short path to list, how can I then get the long filename from the resulting short filenames it lists (GetLongPathName() doesn't exist, stupidly)?

Is there a simple way of getting a list of files, using long filenames throughout (i.e., I supply a path and it produces a list for me), or is FindFirstFile() and FindNextFile() the only way to go?



_ _
o o Jason Teagle
<
v jteagle@geocities.com