Jump to content
  • Advertisement
Sign in to follow this  
ajm113

Getting Open With to work for my application? (Win32)

This topic is 3661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So how can "Open With" pass in the file location into my app to load in Win32 or perhaps when the user opens the file my app will load up with that file location passed in. Then my application will load that file with the location passed in. I tried Google and I couldn't find much.. Win32/C++ VS2005 STD - Windows xp/Vis

Share this post


Link to post
Share on other sites
Advertisement
That link still doesn't quite answers my question that well, sorry. I know I am supposed to go in regedit and find the ext, but how do I set up my app for Reg and how do I go in my app or in reg to tell what information goes where when the file is opened?

Share this post


Link to post
Share on other sites
I set up a .slf key in ROOT area directorys set up like so:

.slf
shell
open
command - Default = "C:\Documents and Settings\username\Desktop\ShawarmaLanguage\debug\ap.exe" %*

but it doesn't seem to have a effect as a test. I did restart my pc...

Share this post


Link to post
Share on other sites
By ROOT area I assume you mean the key is in HKEY_CLASSES_ROOT? If so then your key is still incorrect in one part: change the value of default from

"C:\Documents and Settings\username\Desktop\ShawarmaLanguage\debug\ap.exe" %*

to

"C:\Documents and Settings\username\Desktop\ShawarmaLanguage\debug\ap.exe" "%1"

and ensure that your program will accept a filename from its command line arguments.

Share this post


Link to post
Share on other sites
[edit]
Ok, I got the command line args working fine. I did a test through VS2005 using a path to the file and it works perfectly.

It still seems that the reg edit is still having no effect with the file ext... Is their anything else I can do for you to help me out?

[Edited by - ajm113 on June 14, 2008 5:31:59 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!