Help


sam fisher

Well-Known Member
Joined
Apr 11, 2004
Messages
9,452
Location
Bristol, UK
Website
blog.peter-r.co.uk
Could someone include the basic bit of code i'd need in C or C++ to open a file just using the default program associated with it? If so that would be really useful. If someone just gives me the general Idea what to do i can probably do the rest. Just I basically need to get this compiled by friday and with the rest of my project.
 
sam fisher posted on Apr 26 2006 at 02:45 PM said:
nickspoon posted on Apr 26 2006 at 09:35 PM said:
It would be done using API calls. What OS do you want to run it on?
XP Pro/Home. Those I believe both use the same.
Use ShellExecuteEx() with a verb of "open"
 
Last edited by a moderator:
sam fisher posted on Apr 26 2006 at 03:26 PM said:
Lol your talking to me here. Me who has read about 1 page of a C learning booklet lol.
Ok then I'll use google for you:

http://www.voidnish.com/articles/ShowArtic...ode=newbiespawn

query was "open document using shellexecuteex". link is first answer returned.

For you, "shellexecute" is probably easier because it's one line of code.
 
Last edited by a moderator:
Thank you. I was just looking through google anyway. Again thank you.

Edit: I cannae get it to work! Nooo!!! Oh well ill try it tomorrow when im not tired. Its not exactly complicated its just I know nothing of hte syntax of C.
 
Back
Top