Call CWnd:: DLGDIRLIST or CWND:: DLGDIRLISTCOMBOBOX, Windows will automatically
Fill the available drive name or the file in the specified directory to the list box or combo box, the next example will Windows
Files in the directory are populated in the combo box:
Bool csampledig:: oninitdialog ()
CDIALOG:: OnInitDialog ()
Tchar Szpath [MAX_PATH] = {"C: // Windows"};
Int nreslt = dlgdirlistcomboBox (Szpath, IDC_COMBO, IDC_CURIDIR,
DDL_ReadWrite | DDL_READOONLY | DDL_HIDDEN |
DDL_SYSTEM | DDL_ARCHIVE);
Return True;
}