This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: XWin design suggestion
- From: Biju <bijumaillist at yahoo dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Tue, 6 May 2003 21:37:38 -0700 (PDT)
- Subject: Re: XWin design suggestion
- Reply-to: cygwin-xfree at cygwin dot com
ago,
--- Alexander Gottwald <Alexander.Gottwald@s1999.tu-chemnitz.de> wrote:
> If someone will present code which stores such values in a text file and is
> as save as storing it in the registry, I will not raise my voice against
> this solution. But I can't see the big advantages of the file solution.
Because of the reason I specified earlier, I use Windows API's
GetPrivateProfileInt, GetPrivateProfileString, WritePrivateProfileString in "kernel32.dll"
to store settings and other things in a *.ini format file.
I also store window size, position etc.
It is fast like a registry (as it cached). And never got any problem with that.
for user specific file location u can use environment variable %userprofile%
also you could use following
SHGetFolderPath.
SHGetSpecialFolderPath
SHGetSpecialFolderLocation
CSIDL_APPDATA
Links
GetPrivateProfileInt
http://msdn.microsoft.com/library/en-us/sysinfo/base/getprivateprofileint.asp
WritePrivateProfileString
http://msdn.microsoft.com/library/en-us/sysinfo/base/writeprivateprofilestring.asp
GetPrivateProfileString
http://msdn.microsoft.com/library/en-us/sysinfo/base/getprivateprofilestring.asp
SHGetSpecialFolderPath
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp
SHGetSpecialFolderLocation
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderlocation.asp
CSIDL
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com