|
-
July 26th, 1999, 09:27 AM
#1
Filling a List box with files from a dir
I am trying to use the DlgDirList command.
This is my call (to test I will need to change dir later on)
CWnd: lgDirList("C:\\", IDC_DirTree, 0, DDL_DIRECTORY);
It will run, but nothing appears in my list box, does this need to be a TreeCtl window from the control box? Or does it matter, I have tried both ways, and neither works.
Thx,
Tony
-
July 26th, 1999, 11:59 AM
#2
Re: Filling a List box with files from a dir
Try "C:\\*.*" as the search path.
-
July 26th, 1999, 12:05 PM
#3
Re: Filling a List box with files from a dir
That didn't fix it
any other ideas.
the IDC_DirTree is a list box... is that the right code for the list box?
-
July 26th, 1999, 12:13 PM
#4
Re: Filling a List box with files from a dir
Yes, I think that is right.
Is the code used in a member function of a class derived from CDialog ?
-
July 26th, 1999, 01:27 PM
#5
Re: Filling a List box with files from a dir
Yes it is. It is a list box on my front dialog.
Would an UpdateData commmand clear the files out?
I wouldn't think so but since I don't have any other ideas....
-
July 26th, 1999, 03:25 PM
#6
Re: Filling a List box with files from a dir
Ok I got the list box to fill finally, but how do i get it to list only directories, and no files?
I am pretty close now....
-
July 26th, 1999, 03:47 PM
#7
Re: Filling a List box with files from a dir
The docs for CWnd: lgDirList list all of the file type options.
DDL_DIRECTORY should list only directories.
You might try adding the DDL_EXCLUSIVE flag also,
or-ed with the directory flag.
-
July 26th, 1999, 03:58 PM
#8
Re: Filling a List box with files from a dir
besides
DlgDirList(dir, IDC_DirTree, 0, DDL_EXCLUSIVE);
what do i need to make it only dirs
-
July 26th, 1999, 04:05 PM
#9
Re: Filling a List box with files from a dir
Try this as the last argument to the call :
DDL_DIRECTORY | DDL_EXCLUSIVE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|