Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

startup an application from the associated document 2

Status
Not open for further replies.

phkwang

Programmer
Mar 24, 2004
1
US
When an application is started by double clicking the associated document, can anyone give me a pointer or two on how to write the startup code of that application to open the actual double-clicked document too?

TIA,
 
Do a search for the ShellExecute API.

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
In short, the filename that was double clicked is (or should be) passed to the executable as a command line argument.

So from VB you need to check the command$ value or from c++ the values of argc and argv





Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top