BOOL DlgDirSelectComboBoxEx(hwndDlg, lpszPath, cbPath, idComboBox) | |||||
HWND hwndDlg; | /* handle of dialog box with list box | */ | |||
LPSTR lpszPath; | /* address of buffer for path string | */ | |||
int cbPath; | /* number of bytes in path string | */ | |||
int idComboBox; | /* identifier of combo box | */ |
The DlgDirSelectComboBoxEx function retrieves the current selection from the list box of a combo box. The list box should have been filled by the DlgDirListComboBox function, and the selection should be a drive letter, a file, or a directory name.
hwndDlg
Identifies the dialog box that contains the combo box.
lpszPath
Points to a buffer that receives the selected path or filename.
cbPath
Specifies the length, in bytes, of the path or filename pointed to by the lpszPath parameter. This value should not be larger than 128.
idComboBox
Specifies the integer identifier of the combo box in the dialog box.
The return value is nonzero if the current combo box selection is a directory name. Otherwise, it is zero.
The DlgDirSelectComboBoxEx function does not allow more than one filename to be returned from a combo box.
If the current selection is a directory name or drive letter, DlgDirSelectComboBoxEx 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 or filename. If there is no selection, the contents of buffer pointed to by the lpszPath parameter do not change.
DlgDirSelectComboBoxEx sends CB_GETCURSEL and CB_GETLBTEXT messages to the combo box.
DlgDirList, DlgDirListComboBox, DlgDirSelect, DlgDirSelectEx, DlgDirSelectComboBox