Jump to content
  • Advertisement

Archived

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

Hans

How about making your "own file extention" in VC?

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

Eg. When I click on jpg-file, ACDSee (image viewing program) opens it. How to make a similar VC program that automatically associates my own file extensions with my game? I know how to edit what program opens which file extension from Windows GUI(view->folder options->file types). But I want to do this automatically. I think it''d be cool if someone downloads a new map to my game, and if (s)he wants to play it, all (s)he needs to do is doubleclick the map file. Then the game opens the map instantly. -Hans [home]

Share this post


Link to post
Share on other sites
Advertisement
It''s in the registry. Forget what keys specifically though, but I have done it before, and it isn''t too hard. Damn, wish my book wasnt upstairs :/
Just read in MSDN about registry, ur sure to find something there.

Share this post


Link to post
Share on other sites
You''ll have to figure out how to do the actual code yourself, but here is what needs doing, to expand on what LordElectro told you already:

Create (change ext to whatever the extension is, et cetera):
My Computer\HKEY_CLASSES_ROOT\.ext\
My Computer\HKEY_CLASSES_ROOT\.ext\(Default) = "extfile";
My Computer\HKEY_CLASSES_ROOT\.ext\Content Type = "text/plain";
My Computer\HKEY_CLASSES_ROOT\extfile\
My Computer\HKEY_CLASSES_ROOT\extfile\(Default) = "My EXT File Thingy"
My Computer\HKEY_CLASSES_ROOT\extfile\Edit Flags = 0x0
My Computer\HKEY_CLASSES_ROOT\extfile\DefaultIcon\
My Computer\HKEY_CLASSES_ROOT\extfile\DefaultIcon\(Default) = "C:\My EXT Prog\MyIcon.ico,0"
My Computer\HKEY_CLASSES_ROOT\extfile\Shell\
My Computer\HKEY_CLASSES_ROOT\extfile\Shell\(Default) = "Open"
My Computer\HKEY_CLASSES_ROOT\extfile\Shell\Open\
My Computer\HKEY_CLASSES_ROOT\extfile\Shell\Open\(Default) = "&Open"
My Computer\HKEY_CLASSES_ROOT\extfile\Shell\Open\command\
My Computer\HKEY_CLASSES_ROOT\extfile\Shell\Open\command\(Default) = ""C:\My EXT Prog\MyExe.exe" %1"

Get the idea?



http://www.gdarchive.net/druidgames/

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!