User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 2 May 2005, 14:27   #1
Radical Edward
Registered User
 
Join Date: Feb 2002
Location: South Pacific
Posts: 4,911
Radical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriend
dialog calling CFileDialog

me again. thanks for all the help from you guys btw, I am learning loads

my current little task is to program a dialog that calls CFileDialog.

essentially I have a dialog in which I am taking in a number of settings from the user in order to batch process files. Two of those settings are a "data storage directory" (1) and a "data save directory" (2), where the files are read from (1) processed, and a processed version of the data stored in (2) . Essentially this means that I need to get 2 file paths and store them in separate strings. Now I could do this from the menu or some other way if I have to, but I would prefer my one settings dialog to be able to get both strings. I have a couple of edit boxes in which one can enter the path manually, and next to these I have plopped a couple of buttons. My aim is that, on a button press, a file dialog opens gets the path, and then puts it in the edit box.

The problem is that my dialog inherits from CDialog, and so it won't let me compile when I try to construct a CFileDialog in the dialog class. is there any way round this? Do I have to make my whole dialog inherit from CFileDialog?

thanks
__________________
I think it's time we blow this scene, get everybody and the stuff together..........

ok 3..... 2..... 1.. let's jam
Radical Edward is offline   Reply With Quote
Unread 2 May 2005, 18:03   #2
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
Re: dialog calling CFileDialog

What error are you getting?
You can make a CFileDialog anywhere, it has nothing to do with the class you're calling it from. You'd only inherit from CFileDialog if you wanted to define a new improved file dialog class.
You display a CFileDialog in the same way you start any dialog box, making an instance of the class and using .DoModal() (or Create and ShowWindow for modeless, but you probably don't want that). There's plenty of examples out there.
queball is offline   Reply With Quote
Unread 3 May 2005, 10:45   #3
Radical Edward
Registered User
 
Join Date: Feb 2002
Location: South Pacific
Posts: 4,911
Radical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriendRadical Edward needs a job and a girlfriend
Re: dialog calling CFileDialog

thanks. it does seem to work now. I'm really not sure what the problem was, I just got an access error, but when I redid the code later it worked fine. probably a typo somewhere or something.
__________________
I think it's time we blow this scene, get everybody and the stuff together..........

ok 3..... 2..... 1.. let's jam
Radical Edward is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 08:39.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018