Getting The My Documents Path For Current User
-
Hello everyone. I am writing a program which is going to create a new folder inside the current user's My Document folder. How do I find the path to the current user's My Document folder? ie. "c:\my documents" on Win98 or "C:\Documents and Settings\SomeUserName\My Documents" in win2000? And what should my application default to when it goes to create datafiles if run on Win95, since there is no "My Documents" folder in Win95? Default to the application's path? I was told by other developers that an application should default to the My Documents folder when creating a new datafile for the first time (like Word does).
-
Hello everyone. I am writing a program which is going to create a new folder inside the current user's My Document folder. How do I find the path to the current user's My Document folder? ie. "c:\my documents" on Win98 or "C:\Documents and Settings\SomeUserName\My Documents" in win2000? And what should my application default to when it goes to create datafiles if run on Win95, since there is no "My Documents" folder in Win95? Default to the application's path? I was told by other developers that an application should default to the My Documents folder when creating a new datafile for the first time (like Word does).
Use
SHGetSpecialFolderPath()
withCSIDL_PERSONAL
as the nFolder parameter.
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!