From: "Joerg Toellner" on
Hi Max,

I use it this way:

// Create or Open the Configfile
wxFileConfig *conf = new wxFileConfig(MT_CONFIGFILE, wxEmptyString,
"MyConfigFileInTheApplicationDir.ini", wxEmptyString,

wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_RELATIVE_PATH);

That creates or opens the ini file from the application directory. I suggest
that you can also give any path/filename-combo for the 3rd. parameter to get
your inifile from everywhere.

Hope this helps
Joerg

_____

Von: Max Velasques [mailto:maxvelasques(a)gmail.com]
Gesendet: Dienstag, 16. Januar 2007 15:57
An: wxWidgets [Lista]
Betreff: Create a .ini config file on a different directory


I´m developing a program that uses the class wxFileConfig to create a ..ini
file with the program configurations.
I use the class like this:

wxFileConfig *config = new wxFileConfig(wxT("FileName"));
config->Write(option,tmpvalue);
config->Read(option,&tmpvalue);

This class works perfectly and create the file "FileName.ini" file on the
HOME directory.
Now I want to be able read/write a config file from a different location.
So, I ask if exist some easy way of doing this?

Thanks!!

Max

--
---------------------------------
Do you want portability?
Try wxWidgets (www.wxwidgets.org)

---------------------------------
Multithreaded download manager:
wxDownload Fast - http://dfast.sourceforge.net