I am trying to fill a listbox with the filenames in a directory. If I put a path that does not exist, i.e. c:\windows\*.exe (I'm using win2k) I get the error message as specified in the error handle, as expected. However if I use a correct path as below the application crashes out. Can anybody spot the mistake that I am making?
VB Code:
if(DlgDirList(hWnd, TEXT("c:\\winnt\\*.exe"), IDC_LIST_CALIBOPTS, 0, DDL_READWRITE | DDL_READONLY)==0) { MessageBox(NULL, "Unable to fill calibration file list", "Error", MB_OK|MB_ICONSTOP); //handle error }
Thank You




Reply With Quote