Hello,
I have a weird problem trying to associate an extension with my application.
I am using visual studio 2008 and a custom document manager derived from CDocManager in order to support multiple extensions.
The application runs fine from the Release build folder and the icon for the application is shown correctly in the taskbar.
Normally, you can associate any extension with a default program by right-clicking on the filename in Windows Explorer. If successful, a new program icon showing the program name and the company name is shown in the OpenWith dialog box. After clicking on Ok, the program is launched and opens the file. And the registry entry for UserChoice for the extension is updated!
However, when I try to associate an extension with an exe file in the Release folder, no icon is created in the OpenWith dialog box! And the association is unsuccessful! The application is not started and the registry entry for UserChoice is not updated!
But when I run the program at command level by specifying the full path to the Release folder and the file to be opened, the application runs successfully! I am stumped!
After spending hours on the internet, I found an interim solution that works and that is to rename the application exe file! You can now associate the extension with the application.
But this sounds fishy. I tried cleaning the solution, deleting the .res file, and rebuilding but when I went back to the original name, it just does not want to associate a specific exe name! Grrr!
Any ideas?
Thanks
I have a weird problem trying to associate an extension with my application.
I am using visual studio 2008 and a custom document manager derived from CDocManager in order to support multiple extensions.
The application runs fine from the Release build folder and the icon for the application is shown correctly in the taskbar.
Normally, you can associate any extension with a default program by right-clicking on the filename in Windows Explorer. If successful, a new program icon showing the program name and the company name is shown in the OpenWith dialog box. After clicking on Ok, the program is launched and opens the file. And the registry entry for UserChoice for the extension is updated!
However, when I try to associate an extension with an exe file in the Release folder, no icon is created in the OpenWith dialog box! And the association is unsuccessful! The application is not started and the registry entry for UserChoice is not updated!
But when I run the program at command level by specifying the full path to the Release folder and the file to be opened, the application runs successfully! I am stumped!
After spending hours on the internet, I found an interim solution that works and that is to rename the application exe file! You can now associate the extension with the application.
But this sounds fishy. I tried cleaning the solution, deleting the .res file, and rebuilding but when I went back to the original name, it just does not want to associate a specific exe name! Grrr!
Any ideas?
Thanks