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
 
Back
Top