DlgDirSelectEx
The DlgDirSelectEx
function retrieves the current selection from a single-selection list box. It
assumes that the list box has been filled by the DlgDirList
BOOL DlgDirSelectEx(
HWND hDlg, |
// handle to dialog
box with list box |
LPTSTR lpString, |
// pointer to
buffer for path string |
int nCount, |
// number of
characters in path string |
int nIDListBox |
// identifier of
list box |
); |
|
Parameters
hDlg
Identifies
the dialog box that contains the list box.
lpString
Points to a
buffer that is to receive the selected path.
nCount
Specifies the
length, in characters, of the buffer pointed to by lpString.
nIDListBox
Specifies the
integer identifier of a list box in the dialog box.
Return Values
If the
current selection is a directory name, the return value is nonzero.
If the current
selection is not a directory name, the return value is zero. To get extended
error information, call GetLastError
Remarks
The DlgDirSelectEx
function copies the selection to the buffer pointed to by the lpString
parameter. If the current selection is a directory name or drive letter, DlgDirSelectEx
removes the enclosing square brackets (and hyphens, for drive letters), so that
the name or letter is ready to be inserted into a new path. If there is no
selection, lpString does not change.
DlgDirSelectEx sends LB_GETCURSEL
See Also