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 |
); |
[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.
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. |
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.
DlgDirList, DlgDirSelectComboBoxEx, GetFullPathName, SHGetFileInfo
Questions:
Can someone give me an example of this nasty function in action. My code is this, m_dirCombo.DlgDirListComboBox(_TEXT("C:\\"), IDC_DIR_COMBO, 0, DDL_DRIVES); and it's failing BIG time,... of course Win32_ERR code 0 is operation completed successfully. WHICH IS NOT TRUE! AND I KNOW IT'S THE PATH,... give me an example of the proper format. PLEASE! m_dirCombo is the control mapped to my IDC_DIR_COMBO combo box. even microsoft's example is giving me a nasty assert error and NOT populating the combo box. any suggestion is appreciated! Thanx!
Comments:
file: /Techref/os/win/api/win32/func/src/f17_3.htm, 7KB, , updated: 2005/12/19 08:50, local time: 2024/11/26 20:40,
18.191.178.16:LOG IN
|
©2024 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? <A HREF="http://ecomorder.com/techref/os/win/api/win32/func/src/f17_3.htm"> DlgDirListComboBox</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.