Solved

EVC++: How to get a directory listing?

Posted on 2004-04-13
6
742 Views
Last Modified: 2009-07-29
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
Comment
Question by:HannibalL
6 Comments
 
LVL 4

Expert Comment

by:bkfirebird
ID: 10819027
0
 

Author Comment

by:HannibalL
ID: 10819252
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
 
LVL 3

Expert Comment

by:akalmani
ID: 10821239
0
 
LVL 14

Accepted Solution

by:
Daniel Junges earned 100 total points
ID: 10822239

      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
 

Author Comment

by:HannibalL
ID: 11047094
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now