MultiSelect CFileDialog (Open)
-
According to MSDN for
CString GetPAthNAme()
:If m_ofn.Flags has the OFN_ALLOWMULTISELECT flag set, this string contains a sequence of null-teminated strings, with the first string being the directory path of the file group selected, followed by the names of all files selected by the user.
Now if I assign the result of calling GetPathName(), the CString I assign it to only reads in upto the first null. So how to I get a hold of the complete list of files returned by getPAthNAme()?
CString a = dlg1.GetPAthName();
and its multiselect.... Thanks, ns
-
According to MSDN for
CString GetPAthNAme()
:If m_ofn.Flags has the OFN_ALLOWMULTISELECT flag set, this string contains a sequence of null-teminated strings, with the first string being the directory path of the file group selected, followed by the names of all files selected by the user.
Now if I assign the result of calling GetPathName(), the CString I assign it to only reads in upto the first null. So how to I get a hold of the complete list of files returned by getPAthNAme()?
CString a = dlg1.GetPAthName();
and its multiselect.... Thanks, ns
Use
GetStartPosition()
andGetNextPathName()
to iterate thru the list of names. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com -
According to MSDN for
CString GetPAthNAme()
:If m_ofn.Flags has the OFN_ALLOWMULTISELECT flag set, this string contains a sequence of null-teminated strings, with the first string being the directory path of the file group selected, followed by the names of all files selected by the user.
Now if I assign the result of calling GetPathName(), the CString I assign it to only reads in upto the first null. So how to I get a hold of the complete list of files returned by getPAthNAme()?
CString a = dlg1.GetPAthName();
and its multiselect.... Thanks, ns
-
According to MSDN for
CString GetPAthNAme()
:If m_ofn.Flags has the OFN_ALLOWMULTISELECT flag set, this string contains a sequence of null-teminated strings, with the first string being the directory path of the file group selected, followed by the names of all files selected by the user.
Now if I assign the result of calling GetPathName(), the CString I assign it to only reads in upto the first null. So how to I get a hold of the complete list of files returned by getPAthNAme()?
CString a = dlg1.GetPAthName();
and its multiselect.... Thanks, ns
-
You have to use GetStartPosition() and GetNextPathName() to iterate through the list of files. If a train station is where the train stops, what's a workstation...?