[RE-SOLVED]:Registry on Windows INI files on other platforms
[RE-SOLVED]:Registry on Windows INI files on other platforms
Hi, ALL,
If I want to read the Registry on Windows, but want to make it work on other platform. I have to use wxRegKey class, or I could do it through the wxConfigBase classes?
Problem is: when I look at the example of wxCommand Base I didn't seeanything related to the registry. I don't know what registry keys will be read and everything.
Could somebody clarify tha, please?
Thank you in advance
If I want to read the Registry on Windows, but want to make it work on other platform. I have to use wxRegKey class, or I could do it through the wxConfigBase classes?
Problem is: when I look at the example of wxCommand Base I didn't seeanything related to the registry. I don't know what registry keys will be read and everything.
Could somebody clarify tha, please?
Thank you in advance
Last edited by ONEEYEMAN on Mon Aug 15, 2005 4:46 am, edited 1 time in total.
wxRegKey is as far as I know, windows only.
USe wxConfig for your configuration. It will automatically save in the registry per default under windows, and for linux I believe it will go to ~/.appname as configuration.
You don't have to deal with what is where, the classes that are created by wxConfig wil do that for you..
- Jorgen
USe wxConfig for your configuration. It will automatically save in the registry per default under windows, and for linux I believe it will go to ~/.appname as configuration.
You don't have to deal with what is where, the classes that are created by wxConfig wil do that for you..
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Hi,
Forget about INI files and registry. When using wxConfig you allow yourself to not worry about where it is all put.
In windows it will be in /HKEY_CURRENT_USER/Software/YourVendor/YourApp
In Linux it will be in a kind of ini file.
In both cases, simply use thw wxConfig classes only, will abstract you from handling the config yourself.
You can however force to stay wih e.g. wxFileConfig. This will on both platforms write to an ini file you specify. The problem then is that INI files in Linux are only writable in the HOME dir of the average user. So letting wxConfig handle that, makes life a lot easier.
Read about it here:
http://www.wxwidgets.org/manuals/2.6.0/ ... configbase
http://www.wxwidgets.org/manuals/2.6.0/ ... igoverview
Regards,
- Jorgen
Forget about INI files and registry. When using wxConfig you allow yourself to not worry about where it is all put.
In windows it will be in /HKEY_CURRENT_USER/Software/YourVendor/YourApp
In Linux it will be in a kind of ini file.
In both cases, simply use thw wxConfig classes only, will abstract you from handling the config yourself.
You can however force to stay wih e.g. wxFileConfig. This will on both platforms write to an ini file you specify. The problem then is that INI files in Linux are only writable in the HOME dir of the average user. So letting wxConfig handle that, makes life a lot easier.
Read about it here:
http://www.wxwidgets.org/manuals/2.6.0/ ... configbase
http://www.wxwidgets.org/manuals/2.6.0/ ... igoverview
Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
-
- Part Of The Furniture
- Posts: 1511
- Joined: Sun Jun 19, 2005 11:37 am
- Location: Singapore
- Contact:
jorg.... its manuals/2.6.1/... update your bookmarks
PS for all you firefox users, you can search the wx docs using your searchbar!
make a bookmark with any title, for the address use http://wxwidgets.org/manuals/2.6.1/wx_%s.html, and in the field 'keyword' type in 'wx' or whatever you want... to search the docs, just type in wx [classname] in your addressbar... and you will be brought to the page with the class name...
if it doesnt exist, it will just be a pesky 404... haha
PS for all you firefox users, you can search the wx docs using your searchbar!
make a bookmark with any title, for the address use http://wxwidgets.org/manuals/2.6.1/wx_%s.html, and in the field 'keyword' type in 'wx' or whatever you want... to search the docs, just type in wx [classname] in your addressbar... and you will be brought to the page with the class name...
if it doesnt exist, it will just be a pesky 404... haha
GREAT TIP!!lowjoel wrote:PS for all you firefox users, you can search the wx docs using your searchbar!
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
It is not recommended to put settings outside the preferred area such as; HKEY_CURRENT_USER/Software/Yourapp
If you really need to read/write from the other parts, you can use wxRegKey directly.
Regards,
- Jorgen
If you really need to read/write from the other parts, you can use wxRegKey directly.
Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
That would be a bad case because not every user on a windows machine can be an adminstrator. HKCU/Software/App should be used for settings, and HKLM/Software/App could be used for global settings set once of the installer.
Regards,
- Jorgen
Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm