please dont rip this site Prev Next

DlgDirListComboBox info  Overview  Group

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



Identifies the dialog box that contains the combo box.
Points to a null-terminated string of the following form:


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.

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.
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.
Specifies the attributes of the files to be displayed. It can be any combination of the following values:




Includes archived files.


Includes subdirectories. Subdirectory names are enclosed in square brackets ([ ]).


Includes drives. Drives are listed in the form [-x-], where x is the drive letter.


Includes only files with the specified attributes. By default, read-write files are listed even if DDL_READWRITE is not specified.


Includes hidden files.


Includes read-only files.


Includes read-write files with no additional attributes.


Includes system files.


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.


If the lpszPathSpec parameter points to a zero-length string or to a string specifying a drive, directory, or both ¾ but no filename ¾ 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



See also:

file: /Techref/os/win/api/win32/func/src/f17_3.htm, 7KB, , updated: 2005/12/19 09:50, local time: 2022/5/23 23:45,

 ©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> DlgDirListComboBox</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2022 contributors:
o List host: MIT, Site host, Top posters @20220523
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!