Поделиться через


CWnd::DlgDirSelect

Retrieves the current selection from a list box.

BOOL DlgDirSelect(
   LPTSTR lpString,
   int nIDListBox 
);

Параметры

  • lpString
    Points to a buffer that is to receive the current selection in the list box.

  • nIDListBox
    Specifies the integer ID of a list box in the dialog box.

Возвращаемое значение

Nonzero if successful; otherwise 0.

Заметки

It assumes that the list box has been filled by the DlgDirList member function and that the selection is a drive letter, a file, or a directory name.

The DlgDirSelect member function copies the selection to the buffer given by lpString. If there is no selection, lpString does not change.

DlgDirSelect sends LB_GETCURSEL and LB_GETTEXT messages to the list box.

It does not allow more than one filename to be returned from a list box. The list box must not be a multiple-selection list box.

Требования

Header: afxwin.h

См. также

Основные понятия

CWnd Class

CWnd Members

Hierarchy Chart

CWnd::DlgDirList

CWnd::DlgDirListComboBox

CWnd::DlgDirSelectComboBox

DlgDirSelectEx