tryTCHAR Path[MAX_PATH+1];HRESULT hr= SHGetSpecialFolderPath( NULL, Path, CSIDL_PERSONAL, FALSE ); if (SUCCEEDED(hr)) { AfxMessageBox(Path); } see other CSIDLs at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp
NULL,
Path,
CSIDL_PERSONAL,
FALSE
); if (SUCCEEDED(hr))
{
AfxMessageBox(Path);
}
see other CSIDLs at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp
至于我的文档,得到系统安装路径后自己去配吧
总之我的文档和系统是一个盘下:)
NULL,
Path,
CSIDL_PERSONAL,
FALSE
);
AfxMessageBox(Path);
思归讲得很对这是得到我的文档的目录TCHAR Path[MAX_PATH+1];HRESULT hr= SHGetSpecialFolderPath(
NULL,
Path,
CSIDL_SYSTEM,
FALSE
);
这是系统目录