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

Started by
1 comment, last by Hans 23 years, 3 months ago
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]
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.
BetaShare - Run Your Beta Right!
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/

This topic is closed to new replies.

Advertisement