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. CFileDialog default folder

CFileDialog default folder

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 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.
  • M Offline
    M Offline
    Martyn Pearson
    wrote on last edited by
    #1

    How do I set the default folder for the CFileDialog? I thought "must be easy - just set the current directory", but it doesn't seem to use the folder set by ::SetCurrentDirectory():( Thanks in advance!

    H 1 Reply Last reply
    0
    • M Martyn Pearson

      How do I set the default folder for the CFileDialog? I thought "must be easy - just set the current directory", but it doesn't seem to use the folder set by ::SetCurrentDirectory():( Thanks in advance!

      H Offline
      H Offline
      HENDRIK R
      wrote on last edited by
      #2

      You can specify the starting directory in the OPENFILENAME member of you CFileDialog. The OPENFILENAME's member lpstrInitialDir points to the corresponding directory.

      M 1 Reply Last reply
      0
      • H HENDRIK R

        You can specify the starting directory in the OPENFILENAME member of you CFileDialog. The OPENFILENAME's member lpstrInitialDir points to the corresponding directory.

        M Offline
        M Offline
        Martyn Pearson
        wrote on last edited by
        #3

        I thought it must be simple, and completely missed that when I looked in the docs for OPENFILENAME. Maybe I put my contact lenses in backwards this morning....:wtf: Thanks for your help!

        H 1 Reply Last reply
        0
        • M Martyn Pearson

          I thought it must be simple, and completely missed that when I looked in the docs for OPENFILENAME. Maybe I put my contact lenses in backwards this morning....:wtf: Thanks for your help!

          H Offline
          H Offline
          HENDRIK R
          wrote on last edited by
          #4

          Martyn Pearson wrote: Maybe I put my contact lenses in backwards this morning. Doesn't matter ... CP is THE replacement for your conact lenses;)

          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