Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » GetHomeDirectory, GetHomeDirFile in Win32
Re: GetHomeDirectory, GetHomeDirFile in Win32 [message #10729 is a reply to message #10728] |
Wed, 25 July 2007 19:22   |
Zardos
Messages: 62 Registered: April 2007
|
Member |
|
|
mrjt wrote on Wed, 25 July 2007 18:36 | It might be a Does anyone know of a better way? Has this been done already?
|
For my personal requirements I have already written some functions to get the default pathes on windows (including vista) what I have found is to use the values from the registry:
HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVers ion\\Explorer\\User Shell Folders
You are probably interested in the Keys:
"Personal"
"Desktop"
...Of course I would share the code, but all this is just an ugly hack with some very specific funtions.
Basically I have the following funtions for storing configurations:
String GetConfigPath(const char*name, const char *subpath);
inline String UserConfigPath(const char *subpath = NULL) { return GetConfigPath("AppData", AppendFileName(GetExeTitle(), subpath)); }
inline String AllUserConfigPath(const char *subpath = NULL) { return GetConfigPath("Common AppData", AppendFileName(GetExeTitle(), subpath)); }
inline String AppConfigPath(const char *subpath = NULL) { return GetConfigPath("ExeConfigFilePath", subpath); }
inline String UserLocalPath(const char *subpath = NULL) { return GetConfigPath("Local AppData", AppendFileName(GetExeTitle(), subpath)); }
String UserConfigFile(const char *file = NULL, const char* subpath = NULL);
String AllUserConfigFile(const char *file = NULL, const char* subpath = NULL);
String AppConfigFile(const char *file = NULL, const char* subpath = NULL);
String UserLocalFile(const char *file = NULL, const char* subpath = NULL);
... well, probably not useful for you.
Edit: The link you mention is declared: Deprecated... I guess its better to use the registry values, and probably the usual way.
[Updated on: Wed, 25 July 2007 19:25] Report message to a moderator
|
|
|
 |
|
GetHomeDirectory, GetHomeDirFile in Win32
By: mirek on Thu, 05 July 2007 20:37
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: benoitc on Thu, 12 July 2007 11:02
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: mirek on Thu, 12 July 2007 21:49
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: benoitc on Fri, 13 July 2007 10:31
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: mirek on Fri, 13 July 2007 13:35
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: mrjt on Wed, 25 July 2007 18:36
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: Zardos on Wed, 25 July 2007 19:22
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: mrjt on Thu, 26 July 2007 10:38
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
By: mirek on Fri, 27 July 2007 12:41
|
 |
|
Re: GetHomeDirectory, GetHomeDirFile in Win32
|
Goto Forum:
Current Time: Mon Jul 07 16:42:41 CEST 2025
Total time taken to generate the page: 0.04015 seconds
|