[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 770
  • Last Modified:

EVC++: How to get a directory listing?

Unlike its counterpart, eVC++ doesn't seem to support the following:

SendMessage(hCombobox, CB_DIR, (WPARAM)DDL_DIRECTORY | DDL_EXCLUSIVE, (LPARAM)FolderName);

The following are "undeclared identifiers":
CB_DIR
DDL_DIRECTORY
DDL_EXCLUSIVE

I am just looking for a way to get a directory/file listing. It does not necessarily have to involve a combo/list box, merely provide me with a directory listing. I'll change the number of points depending on the complexity of the answer. Thanks in advance.



0
HannibalL
Asked:
HannibalL
1 Solution
 
bkfirebirdCommented:
0
 
HannibalLAuthor Commented:
I'm more looking for something which will give a string, array, or combo/list box a list of the folders and files in a specified path.
0
 
Daniel JungesCommented:

      WIN32_FIND_DATA FileData;
      HANDLE handle = FindFirstFile(L"*", &FileData);
      BOOL result = (handle!=INVALID_HANDLE_VALUE ? TRUE : FALSE);

      while( result == TRUE ){
                  CString file = FileData.cFileName;
                  ...
                  result = FindNextFile(handle, &FileData);
         }
         FindClose(handle);
0
 
HannibalLAuthor Commented:
Sorry, the question was not resolved, and I forgot to post anything. I'll dole out points to junges, seeming as he helped the most. The code still returned more errors than I know what to do with, but I will continue working on it.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now