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
LVL 1
MothAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jkrConnect With a Mentor Commented:
Point your browser to 'http://users.southeast.net/~rhwarner/software/software.html'

There you can download 'cshortcut.zip', which contains a complete sample on how to create a shortcut...

0
 
TimBCommented:
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?
0
 
jkrCommented:
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 ;-)
0
 
MothAuthor Commented:
Thanks, - It works
0
All Courses

From novice to tech pro — start learning today.