How to associate an Extension with my program ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Is it possible to write a code in C++ to associate a given file extension
with our application? So that if user double click on the file on Windows
Explorer, our application will be launched.

Thanks
Tran Hong Quang
 
Tran Hong Quang said:
Is it possible to write a code in C++ to associate a given file extension
with our application? So that if user double click on the file on Windows
Explorer, our application will be launched.

Yes. The shell's file associations are stored in the registry:

http://msdn.microsoft.com/library/d..._extending/fileassociations/fa_file_types.asp

You certainly can manipulate the registry with code. Details are here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/registry_functions.asp

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top