MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / FCreateDesktopIcon

Function FCreateDesktopIcon

wdriver.cpp:3119–3133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3117// Add an icon pointing to the Astrolog executable on the Windows desktop.
3118
3119flag FCreateDesktopIcon()
3120{
3121 char szDir[cchSzMax], szName[cchSzMax];
3122 LPITEMIDLIST pidl;
3123 flag fRet;
3124
3125 SHGetSpecialFolderLocation(wi.hwnd, CSIDL_DESKTOPDIRECTORY, &pidl);
3126 SHGetPathFromIDList(pidl, szDir);
3127 sprintf(szName, "%s %s", szAppName, szVersionCore);
3128 fRet = FCreateShortcut(szDir, szName,
3129 "astrolog.exe", "Astrolog executable", 0);
3130 if (!fRet)
3131 PrintError("Failed to create desktop icon.");
3132 return fRet;
3133}
3134
3135
3136// Create a Windows program group folder containing icons for Astrolog.

Callers 3

FProcessSwitchesFunction · 0.85
NProcessSwitchesWFunction · 0.85
NWmCommandFunction · 0.85

Calls 2

FCreateShortcutFunction · 0.85
PrintErrorFunction · 0.85

Tested by

no test coverage detected