Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


how to make openwith work?

This topic is 5711 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

i have made a level editor for my game , it extension is .p3d what do i have to add to my application so that when i right click on a *.p3d file and choose openwith , and then choose my program , the level editor will open this file?? i don't mean the association with the extension from windows , i mean the part i should add to my level editor? thanks in advance xee.. [edited by - xeee on October 3, 2002 5:03:52 PM]

Share this post

Link to post
Share on other sites
I believe that the command line (the LPCSTR variable passed to WinMain) would then contain the file that you opened. So, if your program is editor.exe and the file is level.p3d, the command line would look something like

C:\EditorPath\editor.exe C:\LevelPath\level.p3d

It's very similar to the int argc, char **argv you see in the main() arguments of console applications, except it's all one contiguous string. So, to process that, all you have to do is check the command line arguments for a .p3d filename, and if there is one, load it during initialization.

[edited by - Aprosenf on October 3, 2002 9:57:24 PM]

Share this post

Link to post
Share on other sites

  • 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!