LB_DIR

LB_DIR

wParam = (WPARAM)(UINT)uAttrs; /* file attributes */

lParam = (LPARAM)(LPCTSTR)lpszFileSpec; /* filename address */

An application sends a LB_DIR message to add a list of file names to a list box.

Parameters

wParam

Specifies the attributes of the files to be added to the list box. It can be any combination of the following values:

Value Meaning

0x00000000 File can be read from or written to.
0x00000001 File can be read from, but not written to.
0x00000002 File is hidden and does not appear in a directory listing.
0x00000004 File is a system file.
0x00000010 The name specified by the lpszFileSpec parameter specifies a directory.
0x00000020 File has been archived.
0x00004000 Include all drives that match the name specified by the lParam parameter.
0x00008000 Exclusive flag. If the exclusive flag is set, only files of the specified type are listed. Otherwise, files of the specified type are listed in addition to “normal” files.

lParam

Points to the null-terminated string that specifies the file name to add to the list. If the file name contains wildcard characters (for example, *.*), all files that match the wildcards and have the attributes specified by the wParam parameter will be added to the list.

Return Value

The return value is the index of the last filename added to the list. The return value is LB_ERR if an error occurs; the return value is LB_ERRSPACE if insufficient space is available to store the new strings.

Comments

The LB_DIR message may be used as either a wide-character message (where text arguments must use Unicode) or an ANSI message (where text arguments must use characters from the Windows 3.x character set installed).

See Also

DlgDirList