怎么样得到桌面和启动的路径 怎么样得到桌面和启动的路径 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SHGetSpecialFolderPathRetrieves the path of a special folder, identified by its CSIDL. BOOL SHGetSpecialFolderPath( HWND hwndOwner, LPTSTR lpszPath, int nFolder, BOOL fCreate);CSIDL_DESKTOPCSIDL_STARTUP LPITEMIDLIST pidl; LPMALLOC pShellMalloc; const int nFolder[2]={CSIDL_DESKTOPDIRECTORY,CSIDL_STARTMENU}; if(SUCCEEDED(SHGetMalloc(&pShellMalloc))) { char Path[MAX_PATH+1]; for(int i=0;i<2;i++) { if(SUCCEEDED(SHGetSpecialFolderLocation(NULL,nFolder[i],&pidl))) { if(SHGetPathFromIDList(pidl,Path)) { if(i==0) m_strDesktopPath=Path; else m_strStartMenuPath=Path; } pShellMalloc->Free(pidl); } } pShellMalloc->Release(); } 请问怎么在多文档应用程序中实现百叶窗?谢谢! 输入法的状态栏是怎样实现的? 如果得到文件信息头? 读内存数据 100分 问全局hook 的MouseProc 问题 怎样判断一个文件夹内有没有指定的文件夹? 怎么删除? 从文件中截取一块(如:10K),如何保证最后一个字不被分割? 请问*.eps是什么文件啊!如何打开? 验证码中的干扰线如何去除? 最近要做手机游戏软件了,谁能提供点资料给我? 如何对UNICODE的*.DAT文件进行操纵?
Retrieves the path of a special folder, identified by its CSIDL.
BOOL SHGetSpecialFolderPath(
HWND hwndOwner,
LPTSTR lpszPath,
int nFolder,
BOOL fCreate
);
CSIDL_DESKTOP
CSIDL_STARTUP
LPMALLOC pShellMalloc;
const int nFolder[2]={CSIDL_DESKTOPDIRECTORY,CSIDL_STARTMENU};
if(SUCCEEDED(SHGetMalloc(&pShellMalloc)))
{
char Path[MAX_PATH+1];
for(int i=0;i<2;i++)
{
if(SUCCEEDED(SHGetSpecialFolderLocation(NULL,nFolder[i],&pidl)))
{
if(SHGetPathFromIDList(pidl,Path))
{
if(i==0)
m_strDesktopPath=Path;
else
m_strStartMenuPath=Path;
}
pShellMalloc->Free(pidl);
}
}
pShellMalloc->Release();
}