[sword-devel] SWConfig or TRegistry

Troy A. Griffitts sword-devel@crosswire.org
Sat, 12 May 2001 22:09:47 -0700


yeah,
	SWConfig is pretty straight forward.

SWConfig conf("myfile.conf");
conf["Section"]["Item"] = "Value";
conf.Save();

this will create/edit a file called myfile.conf
and add/change an "Item" and set it to "Value", e.g.

[Section]
Item=Value

You can read this value just the same:

SWConfig conf("myfile.conf");
cout << conf["Section"]["Item"] << "\n";

Thanks for asking.  There are already to files that we are using in the
win32 GUI: layout.conf and options.conf

	-Troy.

> dtrotzjr@arilion.com wrote:
> 
> Troy
> I notice that settings are being stored using the SWConfig
> class rather than using the built in Registry tools that Borland comes
> with. Should I use SWConfig instead of the Windows Registry? No big
> deal to me I just want to be consistent with what you are doing.
> David