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. Simple Problem. How can I show an "Open file" dialog in a dialog-based App from MFC AppWizard

Simple Problem. How can I show an "Open file" dialog in a dialog-based App from MFC AppWizard

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiondelphihelp
3 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.
  • A Offline
    A Offline
    andreir23
    wrote on last edited by
    #1

    I am a Visual C++ newbie (I worked with Borland Delphi a long time so I know something... although not what I need now). I have to write a file encoder. In VC++ 6 Everything is set, I began a new project with MFC AppWizard, I selected dialog-based and now I have a dilemma: How do I show up an "Open file" dialog type window??! and a save one too... I would like if possible to be able to change the file filter and/or caption (I am developping it in another language) Like in Notepad when you hit CTRL-O or File->Open. I don't necesarily need it Win2000/XP style but I HOPE THERE IS A FUNCTION IN THE WIN SDK. In delphi it was so simple.Just drop a OpenFileDialog control on the main form and say: "Dialog1.Execute();" Visual C++ is certainly no RAD for me... Thanks in advance! ;-)

    L 1 Reply Last reply
    0
    • A andreir23

      I am a Visual C++ newbie (I worked with Borland Delphi a long time so I know something... although not what I need now). I have to write a file encoder. In VC++ 6 Everything is set, I began a new project with MFC AppWizard, I selected dialog-based and now I have a dilemma: How do I show up an "Open file" dialog type window??! and a save one too... I would like if possible to be able to change the file filter and/or caption (I am developping it in another language) Like in Notepad when you hit CTRL-O or File->Open. I don't necesarily need it Win2000/XP style but I HOPE THERE IS A FUNCTION IN THE WIN SDK. In delphi it was so simple.Just drop a OpenFileDialog control on the main form and say: "Dialog1.Execute();" Visual C++ is certainly no RAD for me... Thanks in advance! ;-)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Sure there is a function in the windows sdk, it's called GetOpenFileName Just fill in the OPENFILENAME struct an call the function. regards

      A 1 Reply Last reply
      0
      • L Lost User

        Sure there is a function in the windows sdk, it's called GetOpenFileName Just fill in the OPENFILENAME struct an call the function. regards

        A Offline
        A Offline
        andreir23
        wrote on last edited by
        #3

        Thank you very much! It helped Now I also used GetSaveFileName ! :-D

        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