LB_ADDFILE

An application sends an LB_ADDFILE message to add the specified filename to a list box that contains a directory listing.

LB_ADDFILE

wParam = 0; // not used; must be zero

lParam = (LPARAM) (LPCTSTR) lpszFilename; // name of file to add

Parameters

lpszFilename

Value of lParam. Points to the name of the file to add.

Return Values

The return value is the zero-based index of the file that was added, or LB_ERR if an error occurs.

Remarks

The list box to which lpszFilename is added must have been filled by the DlgDirList function.

See Also

DlgDirList, LB_ADDSTRING