I have several dialogs that my user will need to use frequently but intermittently. I want to save their settings from the last use and use them to initialize the dialog on the next use. The obvious ways to do this would be to use static variables or to record the values in a parent window, but this gets messy with lots of variables and settings, and then I'd have to save them all to a file if I want to access them next time the program is run. Does wxWidgets have anything easier set up? Is wxConfigBase appropriate for this?
Furthermore, I'm quite reluctant to touch the windows registry. Would you say this is a wise reservation, or a symptom of my irrational fear of all things msWindows?
Thanks!
best way to record recent control values? wxConfigBase?
-
- Super wx Problem Solver
- Posts: 466
- Joined: Sat Sep 18, 2004 2:49 am
- Location: California, USA
Re: best way to record recent control values? wxConfigBase?
You can use an ini file. CodeProject has a crossplatform inifile class that you can use.
-Guru Kathiresan
-Guru Kathiresan
Is this what you're referring to?:
https://secure.codeproject.com/file/ini.asp
So then I just create a unique identifier for each field in the ini file and read from there when I recreate a window or frame? Seems easy enough, although I'm surprised it's not automated yet.
Thanks.
https://secure.codeproject.com/file/ini.asp
So then I just create a unique identifier for each field in the ini file and read from there when I recreate a window or frame? Seems easy enough, although I'm surprised it's not automated yet.
Thanks.