wxFileConfig example?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Anthony11
Knows some wx things
Knows some wx things
Posts: 30
Joined: Sun Jul 05, 2015 7:14 am

wxFileConfig example?

Post by Anthony11 »

can someone write or find an example for wxFileConfig read/write, pretty please?

[ininame]
iniarg1=value1
iniarg2=value2
iniarg3=value3
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxFileConfig example?

Post by doublemax »

Use the source, Luke!
Anthony11
Knows some wx things
Knows some wx things
Posts: 30
Joined: Sun Jul 05, 2015 7:14 am

Re: wxFileConfig example?

Post by Anthony11 »

thanks a bunch
Anthony11
Knows some wx things
Knows some wx things
Posts: 30
Joined: Sun Jul 05, 2015 7:14 am

Re: wxFileConfig example?

Post by Anthony11 »

Code: Select all

wxFileConfig * config = new wxFileConfig( "", "", filename);
config->Read( wxT("/initScript"), &initializationFile);
config->Read( wxT("/scriptEditor"), &scrEd);
config->Read( wxT("/imageEditor"), &imgEd);
delete config;
can you fix my read function as well?
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxFileConfig example?

Post by doublemax »

Code: Select all

initializationFile = config->Read( wxT("/initScript") );
Use the source, Luke!
Anthony11
Knows some wx things
Knows some wx things
Posts: 30
Joined: Sun Jul 05, 2015 7:14 am

Re: wxFileConfig example?

Post by Anthony11 »

doublemax wrote:

Code: Select all

initializationFile = config->Read( wxT("/initScript") );
sorry, my mistake, i've forgot to enter full path in 'filename'
Post Reply