Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFileDialog Bug

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello all,

i'm having a trouble using CFileDialog. My application uses it to select more than one file to be processed , so I use the OFN_ALLOWMULTISELECT flag to allow selecting more than one file. After that i use the GetStartPosition() method. When I select less than 17 files , ok , no problem ,but when i select more than 17 , the POSITION structuret that is returned by the method is returned null to me.

Do anybody can helps me ?

TIA

Thor da Silva
 
CFileDialog has a Member:
TCHAR m_szFileName[_MAX_PATH];
By Multiselection this member contains all Names, and there are not much place. You must create Your own Class to avoid this Problem. The best way, take source of class CFileDialog, change class Name and change this member only. You should look another places where this member is used (m_ofn.nMaxFile contains the length of m_szFileName) too.
Do not forget to remove all ASSERT() from these source to become right release Version!
Or, if You wish to select a Directory, use SHBrowseForFolder() instead (that has some bugs too).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top