Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem using CDM_GETFILEPATH to get full file name from a Save Dialog

Problem using CDM_GETFILEPATH to get full file name from a Save Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nitheesh George
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • N Nitheesh George

      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

      R Offline
      R Offline
      Rajkumar R
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups