Bill Forster
Bill Forster

Reputation: 6297

What is the cleanest way to direct wxWidgets to always use wxFileConfig?

I am writing my first serious wxWidgets program. I'd like to use the wxConfig facility to make the program's user options persistent. However I don't want wxConfigBase to automatically use the Windows registry. Even though I'm initially targeting Windows, I'd prefer to use a configuration (eg .ini) file. Does anyone know a clean and simple way of doing this ? Thanks.

Upvotes: 2

Views: 1370

Answers (2)

Paulius
Paulius

Reputation: 5870

According to the source of wx/config.h file, all you need is to define the wxUSE_CONFIG_NATIVE symbol to 0 in your project and then it will always use wxFileConfig.

Upvotes: 2

Milan Babuškov
Milan Babuškov

Reputation: 61138

The cleanest and simplest way is to use wxFileConfig class.

Upvotes: 2

Related Questions