Discussion:
Open random file inside a folder using Visual C++ 6.0
(too old to reply)
Eka Candra
2009-09-10 04:13:10 UTC
Permalink
I have a folder and I determine name of the folder. I means, I know
what the accessed folder name is.
Inside this folder, I put manually some text file with random name
file.
How is the way I access a text file inside that folder using my
program in Visual C++ 6.0?

There is a filelistbox in Visual Basic. Is there any equivalent
function in Visual C++ 6.0? so that, I can list text file inside that
folder and access it.

Please help me to solve this problem.

Thank you before....

----Eka Candra----
xiaosi
2009-09-10 04:27:30 UTC
Permalink
menu bar "Project\Add To Project\Files..."
-or-
shortcut menu on project in FileView "Add Files to Project..."
Post by Eka Candra
I have a folder and I determine name of the folder. I means, I know
what the accessed folder name is.
Inside this folder, I put manually some text file with random name
file.
How is the way I access a text file inside that folder using my
program in Visual C++ 6.0?
There is a filelistbox in Visual Basic. Is there any equivalent
function in Visual C++ 6.0? so that, I can list text file inside that
folder and access it.
Please help me to solve this problem.
Thank you before....
----Eka Candra----
Scot T Brennecke
2009-09-10 08:00:43 UTC
Permalink
Two ways, off he top of my head:
FindFirstFile Function (Windows): http://msdn.microsoft.com/en-us/library/aa364418.aspx
FindNextFile Function (Windows): http://msdn.microsoft.com/en-us/library/aa364428.aspx
or
LB_DIR Message (): http://msdn.microsoft.com/en-us/library/bb775185.aspx
Post by Eka Candra
I have a folder and I determine name of the folder. I means, I know
what the accessed folder name is.
Inside this folder, I put manually some text file with random name
file.
How is the way I access a text file inside that folder using my
program in Visual C++ 6.0?
There is a filelistbox in Visual Basic. Is there any equivalent
function in Visual C++ 6.0? so that, I can list text file inside that
folder and access it.
Please help me to solve this problem.
Thank you before....
----Eka Candra----
mzdude
2009-09-10 12:30:03 UTC
Permalink
I have a folder and I determine name of the folder.  I means, I know
what the accessed folder name is.
Inside this folder, I put manually some text file with random name
file.
How is the way I access a text file inside that folder using my
program in Visual C++ 6.0?
There is a filelistbox in Visual Basic. Is there any equivalent
function in Visual C++ 6.0? so that, I can list text file inside that
folder and access it.
Please help me to solve this problem.
If you are using MFC then look up CFileDialog.

If using native windows API look up GetOpenFileName / GetSaveFileName
Loading...