File Type Extensions
-
Hi, I'm having a small issue with associating the extension of my files with my application. I'm wanting to use a 2 character extension for my files. Is this inherently wrong, or should it associate? My resource string is as follows and seems to be ok IDR_MAINFRAME "Ext File\nFile\nExt\nInstall Files (*.a1)\n.a1\NewFile.Document\nNewFile Document" Any ideas? Tony
-
Hi, I'm having a small issue with associating the extension of my files with my application. I'm wanting to use a 2 character extension for my files. Is this inherently wrong, or should it associate? My resource string is as follows and seems to be ok IDR_MAINFRAME "Ext File\nFile\nExt\nInstall Files (*.a1)\n.a1\NewFile.Document\nNewFile Document" Any ideas? Tony
What's the problem?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Hi, I'm having a small issue with associating the extension of my files with my application. I'm wanting to use a 2 character extension for my files. Is this inherently wrong, or should it associate? My resource string is as follows and seems to be ok IDR_MAINFRAME "Ext File\nFile\nExt\nInstall Files (*.a1)\n.a1\NewFile.Document\nNewFile Document" Any ideas? Tony
maycockt wrote:
IDR_MAINFRAME "Ext File\nFile\nExt\nInstall Files (*.a1)\n.a1\NewFile.Document\nNewFile Document"
isn't it assocaited?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
What's the problem?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
Hi David, When double clicking on a file with a ".a1" extension it doesnt launch my application. I'm assuming therfore that it isnt associated with my application. It also does not display the application icon, which I understood it should. My complete code, for what it's worth, to load the SingleDocTemplate is as follows
CSingleDocTemplate* pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME,
RUNTIME_CLASS(CProgDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CProgView));
AddDocTemplate(pDocTemplate);IDR_MAINFRAME is as per the original post Thanks Tony
-
Hi David, When double clicking on a file with a ".a1" extension it doesnt launch my application. I'm assuming therfore that it isnt associated with my application. It also does not display the application icon, which I understood it should. My complete code, for what it's worth, to load the SingleDocTemplate is as follows
CSingleDocTemplate* pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME,
RUNTIME_CLASS(CProgDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CProgView));
AddDocTemplate(pDocTemplate);IDR_MAINFRAME is as per the original post Thanks Tony
maycockt wrote:
When double clicking on a file with a ".a1" extension it doesnt launch my application.
Does HKEY_CLASSES_ROOT\.a1 exist in the registry? If so, does it have a default value?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Hi, I'm having a small issue with associating the extension of my files with my application. I'm wanting to use a 2 character extension for my files. Is this inherently wrong, or should it associate? My resource string is as follows and seems to be ok IDR_MAINFRAME "Ext File\nFile\nExt\nInstall Files (*.a1)\n.a1\NewFile.Document\nNewFile Document" Any ideas? Tony
OK, problem partially solved. I added RegisterShellFileTypes after my AddDocTemplate(), but the assocation is shown with a small sized icon, not the standard size icon you would expect to see if you were viewing a file list with "details" selected from Windows Explorer. How can I affect the associated icon? TIA Tony
-
OK, problem partially solved. I added RegisterShellFileTypes after my AddDocTemplate(), but the assocation is shown with a small sized icon, not the standard size icon you would expect to see if you were viewing a file list with "details" selected from Windows Explorer. How can I affect the associated icon? TIA Tony
Check the icon file that you are using. It does not/should not contain just one image. It should contain multiple versions with different color depths and sizes. (You may have to look around in your icon editor to see how to move between these versions.) You may be missing a needed size/color depth version, so Windows is trying to make due with something else. For some more information see here[^] and here[^].
Please do not read this signature.