这种问题很多人都问过
void CShortCutDlg::OnCreate() 
{
// TODO: Add your control notification handler code here
char m_strWinDir[512];
long rval;
HKEY hKey;
DWORD dwType; 
DWORD dwSize;
rval = RegOpenKeyEx(HKEY_CURRENT_USER,
        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
        NULL, KEY_QUERY_VALUE, &hKey);

if(rval == ERROR_SUCCESS)
{
        dwSize = 512;
        rval = RegQueryValueEx(hKey, "Programs", 0, &dwType, (LPBYTE)m_strWinDir, &dwSize);
        rval = RegCloseKey(hKey);
        strcat(m_strWinDir, "\\VC编程技巧");
        CreateDirectory(m_strWinDir, NULL);
        strcat(m_strWinDir, "\\VC编程技巧.lnk");
        HRESULT hres; 
        IShellLink* psl; 
        // 取得指向IshellLink接口的指针 
        CoInitialize(NULL);
        hres = CoCreateInstance(CLSID_ShellLink, NULL, 
CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *)&psl); 
        if(SUCCEEDED(hres))
        { 
IPersistFile* ppf; 
// 设置快捷对象路径,并增加描述 
psl->SetPath("c:\\VCSkill\\VCSkill.exe"); 
psl->SetWorkingDirectory("c:\\VCSkill");
psl->SetDescription("VC编程技巧"); 
hres = psl->QueryInterface(IID_IPersistFile, 
(LPVOID *)&ppf); 
if(SUCCEEDED(hres))

WORD wsz[MAX_PATH]; 
// 字符串为ANSI格式
MultiByteToWideChar(CP_ACP, 0, m_strWinDir, -1,
wsz, MAX_PATH); 
// 保存链接
hres = ppf->Save(wsz, TRUE); 
ppf->Release(); 

psl->Release(); 
        }
}
else
{
        AfxMessageBox("创建程序组和快捷方式失败,请稍后自行创建!");
}
}