Solved

EVC++: How to get a directory listing?

Posted on 2004-04-13
6
738 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
Comment Utility
0
 

Author Comment

by:HannibalL
Comment Utility
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
Comment Utility
0
 
LVL 14

Accepted Solution

by:
Daniel Junges earned 100 total points
Comment Utility

      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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

743 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

14 Experts available now in Live!

Get 1:1 Help Now