Overview
Group
Quick Info

Windows NT
Yes
Win95
Yes
Win32s
Yes
Import Library
user32.lib
Header File
winuser.h
Unicode
WinNT
Platform Notes
None

DlgDirListComboBox

The DlgDirListComboBox function fills the specified combo box with a directory listing. It fills the list with the names of all files, drives, and subdirectories that match the specified attributes and path string.

int DlgDirListComboBox(

HWND hDlg,
// handle to dialog box with combo box
LPTSTR lpPathSpec,
// pointer to path or filename string
int nIDComboBox,
// identifier of combo box
int nIDStaticPath,
// identifier of static control
UINT uFiletype
// file attributes to display
);

Parameters

hDlg

Identifies the dialog box that contains the combo box.

lpPathSpec

Points to a null-terminated string of the following form:

[drive:][\]][directory\[...]][filename]

If the specified string includes a drive or directory path, the DlgDirListComboBox function changes the current drive and directory before filling the list. After the list is filled, the drive and directory path are removed from the string specified by the lpPathSpec parameter.

nIDComboBox

Specifies the identifier of a combo box control in a dialog box. If nIDComboBox is zero, the DlgDirListComboBox function assumes no combo box exists and does not attempt to fill it.

nIDStaticPath

Specifies the identifier of the static text control in which the DlgDirListComboBox function is to display the current directory. If nIDStaticPath is zero, DlgDirListComboBox assumes no such control is present.

uFiletype

Specifies the attributes of the files to be displayed. It can be any combination of the following values:

Value
Meaning
DDL_ARCHIVE
Includes archived files.
DDL_DIRECTORY
Includes subdirectories. Subdirectory names are enclosed in square brackets ([ ]).
DDL_DRIVES
Includes drives. Drives are listed in the form [-x-], where x is the drive letter.
DDL_EXCLUSIVE
Includes only files with the specified attributes. By default, read-write files are listed even if DDL_READWRITE is not specified.
DDL_HIDDEN
Includes hidden files.
DDL_READONLY
Includes read-only files.
DDL_READWRITE
Includes read-write files with no additional attributes.
DDL_SYSTEM
Includes system files.
DDL_POSTMSGS
Posts messages to the application's message queue. By default, the DlgDirList function sends messages directly to the dialog box procedure.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. For example, if the string specified by lpPathSpec is not a valid path, the function fails. To get extended error information, call GetLastError.

Remarks

If the lpszPathSpec parameter points to a zero-length string or to a string specifying a drive, directory, or both pics/WIN3200090001.gif but no filename pics/WIN3200090001.gif the filename *.* (wildcards) is assumed.

Windows NT:

The directory listing displays long filenames, if any.

Windows 95:

The directory listing displays short filenames (the 8.3 form). You can use the SHGetFileInfo or GetFullPathName functions to get the corresponding long filename.

See Also

DlgDirList
, DlgDirSelectComboBoxEx, GetFullPathName, SHGetFileInfo

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database