Folders and option to select them.
Hi
I am having troubles to create a program that can go to a specific folder and read and writes files in there, how could I do that (the executable is in another folder).
I am using c and opengl and glut library.
Is there any way that with a right click you could select among the available folders.
Any idea, thanks, Raistlin.
If you want to read or write files to a certain folder you just need the path of the folder you want to write to. If you want the user of your program to be able to select the folder to read or write files to (visually), I would suggest using a dialog box. The simplest implementation is probably the CFileDialog box (MFC).
Hi, Thanks, but how do you put glut and MFC togheter? Each of those have their own infinite loop.
You need to go into your project settings and set up the app to "Use MFC in a shared DLL". Then replace any "#include <windows.h>" with "#include <afxwin.h>"...Then, create an instance of a CFileDialog where you want...I don''t think I''m forgetting anything here as of now...
Hi
I have been looking at the issue of using MFC as shared dll. it is just enough to change by of do I need something else? I have no idea.
Thanks, I really apreciate your help.
I have been looking at the issue of using MFC as shared dll. it is just enough to change by of do I need something else? I have no idea.
Thanks, I really apreciate your help.
1. right click on project in solution viewer.
2. select properties.
3. under "General"...go to the "Use of MFC" box ...choose "Use
MFC in a shared DLL".
4. read my previous post.
2. select properties.
3. under "General"...go to the "Use of MFC" box ...choose "Use
MFC in a shared DLL".
4. read my previous post.
Or, instead of hasseling with MFC, you could just use the much simpler GetOpenFileName and GetSaveFileName functions. See this page on how to use them. You don''t need to mess with project settings or anything. Trust me, it''s much easier without MFC for just this one task.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement