如何在快速启动栏创建快捷方式
#define NO_WIN32_LEAN_AND_MEAN
#include <shlobj.hpp>
#include <vcl.h>
// 以上三行放在单元文件最开始
//---------------------------------------------------------------------------
struct TShortcutCfg
{
// 构造函数
TShortcutCfg()
{
nShowCmd = SW_SHOWNORMAL;
wHotKey = 0;
nIconIndex = 0;
}
// 结构成员:
AnsiString strShortcutName; //
AnsiString strLnkDir; //
AnsiString strDestFile; //
AnsiString strArguments; //
AnsiString strIconFile; //
int nIconIndex; //
AnsiString strWorkingDir; //
AnsiString strDescription; //
WORD wHotKey; //
int nShowCmd; //
};
//---------------------------------------------------------------------------
// 在快速启动栏创建快捷方式
bool CreateQuickLaunchShortcut(TShortcutCfg *scConfig)
{
char szBuf[MAX_PATH];
bool bReturn = true;
wchar_t wszBuf[MAX_PATH];
IShellLink *pShellLink;
AnsiString strShortcutFile;
LP99vEMIDLIST lpItemIdList;
SHGetSpecialFolderLocation(0, CSIDL_APPDATA,