怎样得到桌面的路径呢?
如题!怎样得到桌面的路径,和安装程序的路径呢? 问题点数:0、回复次数:2Top
1 楼EnochShen(小疯子:真的好菜—知耻而后勇!)回复于 2004-12-03 23:40:06 得分 0
桌面:
char* szFilePath = new char[MAX_PATH];
SHGetSpecialFolderPath(m_hWnd,szFilePath,CSIDL_DESKTOP,FALSE);
什么程序?WIN?
Top
2 楼laiyiling(陌生人[MVP])回复于 2004-12-03 23:41:59 得分 0
TCHAR szPath[512];
SHGetSpecialFolderPath(NULL,(LPTSTR)szPath,CSIDL_HISTORY,FALSE);//根据下面的换第三个参数
MessageBox(szPath);
//程序组文件夹
#define CSIDL_PROGRAMS 2
C:\Documents and Settings\UserName\[开始菜单]\程序
//当前用户名文档位置
# define CSIDL_PERSONAL 5
C:\Documents and Settings\UserName\My Documents
# define CSIDL_FAVORITES 6
C:\Documents and Settings\UserName\Favorites
# define CSIDL_STARTUP 7
C:\Documents and Settings\UserName\[开始菜单]\程序\启动
# define CSIDL_RECENT 8
C:\Documents and Settings\UserName\Recent
# define CSIDL_SENDTO 9
C:\Documents and Settings\UserName\SendTo
# define CSIDL_STARTMENU 11
C:\Documents and Settings\UserName\[开始菜单]
# define CSIDL_DESKTOPDIRECTORY 16
C:\Documents and Settings\UserName\桌面Top




