Condividi tramite


CFileDialog::GetNextPathName

Call this function to retrieve the next filename from the group selected in the dialog box.

CString GetNextPathName(
   POSITION& pos 
) const;

Parameters

  • pos
    A reference to a POSITION value returned by a previous GetNextPathName or GetStartPosition function call. NULL if the end of the list has been reached.

Return Value

The full path of the file.

Remarks

The path of the filename includes the file's title plus the entire directory path. For example, GetNextPathName will return "C:\FILES\TEXT.DAT" for the file C:\FILES\TEXT.DAT. You can use GetNextPathName in a forward iteration loop if you establish the initial position with a call to GetStartPosition.

If the selection consists of only one file, that file name will be returned.

Requirements

Header: afxdlgs.h

See Also

Reference

CFileDialog Class

Hierarchy Chart

CFileDialog::GetFileName

CFileDialog::GetStartPosition

Other Resources

CFileDialog Members