File Type Associating

Started by
8 comments, last by LessBread 18 years, 7 months ago
Hey guys, i need help trying to get a file type "mp3" to automatically load in my app rather then media player, i searched on the net and only get VB tutes, any clue or code as to how i can do this?
Advertisement
Assuming that you use WinXP, right click on the file, choose "open with" then select your application (or click browse if it isnt listed) then check the little box named "always use this application for this kind of file" or something like that. Then click OK and you should be ok. :)
It is a registry setting. Look at the HKEY_CLASSES_ROOT and the extention (.mp3)

Cheers
Or do you mean having your app register itself as the default for those files? A tad trickier -- the MSDN Library is your guide here. For my simple image viewing application, SimpleView, I used the Win32 Registry functions to create the necessary keys, using the File Association guide.

Hope that helps,
Twilight Dragon
{[JohnE, Chief Architect and Senior Programmer, Twilight Dragon Media{[+++{GCC/MinGW}+++{Code::Blocks IDE}+++{wxWidgets Cross-Platform Native UI Framework}+++
no, i dont mean manually i mean in code so people using my media player will get there mp3's playing in my app.
The links in my previous post should help you :)
{[JohnE, Chief Architect and Senior Programmer, Twilight Dragon Media{[+++{GCC/MinGW}+++{Code::Blocks IDE}+++{wxWidgets Cross-Platform Native UI Framework}+++
thanks, i submitted just afta u did.
wow, this creating a File Association stuff is pretty poorly documented, has anyone got a real practical source code example, or know where i can find one, i searcg PlanetSourceCode and found Jack.
When you create a setup project in Visual Studio you also get the option to assign file extentions. This way you don't code it yourself but leave it to a setup...

cheers
This might help, Shell Explorer's Cookbook and Subject Index
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man

This topic is closed to new replies.

Advertisement