Link to home
Start Free TrialLog in
Avatar of Moth
Moth

asked on

how to create a shortcut using vc4.0

how can I create a shortcut to an .exe file using visual c++ 4.0.
This is for an install program to create the shortcut.

I need to place the shortcut in:
C:\WINNT\profiles\All Users\Start Menu\Programs\Myprogram

Thanks,

M
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimB
TimB

Grat - this looks hopefull,
Do you know what the parameters are or mean?
If I call the create function from this class, I need to pass in the following:

Create(LPCTSTR lpszPath,     LPCTSTR lpszTarget,
                       LPCTSTR lpszStartDir, LPCTSTR lpszDescription,
                       LPCTSTR lpszArgs,     LPCTSTR lpszIconLocation,
                       int nIconIndex,       WORD    wHotkey,
                       int nShowCmd)

Some of these args I can guess, but I don't know what  lpszArgs,  szIconLocation, nIconIndex, wHotkey, and nShowCmd are....(and what they should be set to...)


any ideas?
lpszArgs: Command line arguments passed to the app when the shortcut is double clicked
szIconLocation: path to the DLL/EXE where the icon for the shortcut is contained
nIconIndex: index of that icon in the binary image
wHotkey: Keycode for the hotkey
nShowCmd: Whether to start minimized, maximized or hidden

(just see the properties dialog of a shortcut ;-)
Avatar of Moth

ASKER

Thanks, - It works