Thread: dlgdirlist can't get it to work

  1. #1
    Registered User
    Join Date
    Dec 2002

    dlgdirlist can't get it to work

    I've followed every example and I can't populate a list box with a directory listing. I've tried it in list boxes on dialog boxes and everything, I just get ntdll errors.

    here's what I try to do with a CFormView:
    DlgDirList( "C:\\*.*", IDC_LIST1, 0, DDL_EXCLUSIVE | DDL_DIRECTORY);

    here's where it stops:
    _AFXWIN_INLINE int CWnd:lgDirList(LPTSTR lpPathSpec, int nIDListBox,
    int nIDStaticPath, UINT nFileType)
    { ASSERT(::IsWindow(m_hWnd)); return :lgDirList(m_hWnd, lpPathSpec, nIDListBox,
    nIDStaticPath, nFileType); }

    I have a list box control on a form view, I just want to be able to list directories, it's for an ftp program, any help would be greatly appreciated, thx

  2. #2
    Registered User
    Join Date
    Aug 2002
    This isn't the same thing exactly, but this is what I use for file lookups. Maybe it will at least give you ideas.

    CString strFilter = _T("Text Files (*.txt) |*.txt||");
    CFileDialog dlg(TRUE, NULL, m_InputFile, OFN_HIDEREADONLY|OFN_EXPLORER, strFilter, NULL); 
    dlg.m_ofn.lpstrTitle = _T(" Select Input File");
    if (dlg.DoModal() == IDOK) 
    m_InputFile = dlg.GetPathName();
    Best Regards,


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. getline() don't want to work anymore...
    By mikahell in forum C++ Programming
    Replies: 7
    Last Post: 07-31-2006, 10:50 AM
  2. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 10:39 PM
  3. Problems in getting OpenGL to work
    By zonf in forum C Programming
    Replies: 5
    Last Post: 02-13-2006, 04:48 AM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. DLL __cdecl doesnt seem to work?
    By Xei in forum C++ Programming
    Replies: 6
    Last Post: 08-21-2002, 04:36 PM