Problem using CDM_GETFILEPATH to get full file name from a Save Dialog
-
Hi, I developing an application which hooks a Common dialog. i used CDM_GETFILEPATH to get the full path from Save dialog. But when there is not file extension is specified with the file name, the CDM_GETFILEPATH return's the full file path without any file extension.i thought If an extension is not given with the file name the default extension is concated with the file name. But this is not happing and CDM_GETFILEPATH give like this "C:\MyFolder\new" and not full path "C:\MyFolder\new.txt". Why?? . And is there any way to get the default file extension from a Common Dilaog using any Mesages and if so Which is that message?. thanks Nitheesh
-
Hi, I developing an application which hooks a Common dialog. i used CDM_GETFILEPATH to get the full path from Save dialog. But when there is not file extension is specified with the file name, the CDM_GETFILEPATH return's the full file path without any file extension.i thought If an extension is not given with the file name the default extension is concated with the file name. But this is not happing and CDM_GETFILEPATH give like this "C:\MyFolder\new" and not full path "C:\MyFolder\new.txt". Why?? . And is there any way to get the default file extension from a Common Dilaog using any Mesages and if so Which is that message?. thanks Nitheesh
Nitheesh George wrote:
thought If an extension is not given with the file name the default extension is concated with the file name
only if you set lpstrDefExt of OPENFILENAME to some value, if it is NULL common dialog won't add the default extension. you can also change the default extension using CDM_SETDEFEXT message.