Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


How to fill a List View Control using DlgDirList or DlgDirListComboBox?

Posted on 2004-10-25
Medium Priority
Last Modified: 2013-11-20
How do I fill a List View Control using DlgDirList or DlgDirListComboBox?

I can fill a list box with this:

char szPath [255] = {"c:\\"};

Can I do the same with a list view control?

Question by:galneweinhaw
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 45

Accepted Solution

AndyAinscow earned 500 total points
ID: 12408145
Not by default.

However you can use CFileFind to find the files/directories and add the items individually to the list control.

  CFileFind finder;
   BOOL bWorking = finder.FindFile("*.*");
   while (bWorking)
      bWorking = finder.FindNextFile();
      // do something with finder.GetFileName()
LVL 45

Expert Comment

ID: 12408726
Another thought.   You could also cheat.
Have a list or combo that is hidden.  Fill that as you  posted above.  Then loop throught the contents, get the string and use that as the item to insert into the list control.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 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