ComboBox_Dir macro (windowsx.h)
Adds names to the list displayed by a combo box. The macro adds the names of directories and files that match a specified string and set of file attributes. It can also add mapped drive letters to the list in a combo box. You can use this macro or send the CB_DIR message explicitly.
Syntax
int ComboBox_Dir(
HWND hwndCtl,
UINT attrs,
LPCTSTR lpszFileSpec
);
Parameters
hwndCtl
Type: HWND
A handle to the control.
attrs
Type: UINT
The attributes of the files or directories to be added to the list in a combo box. For more information, see CB_DIR.
lpszFileSpec
Type: LPCTSTR
A pointer to the null-terminated string that specifies an absolute path, relative path, or filename. An absolute path can begin with a drive letter (for example, d:) or a UNC name (for example, \ machinename\ sharename).
Return value
Type: int
If the message succeeds, the return value is the zero-based index of the last name added to the list. If an error occurs, the return value is CB_ERR. If there is insufficient space to store the new strings, the return value is CB_ERRSPACE.
Remarks
For more information, see CB_DIR.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | windowsx.h |