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

cFileDialog

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 3 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
    macmac38
    wrote on last edited by
    #1

    Hello, CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, "SI Projekte (*.3dsi)|*.3dsi |Alle Dateien (*.*)|*.*||", this); i only like to show my .3dsi files, but this only shows folders? Thanks, Mark

    M J M 3 Replies Last reply
    0
    • M macmac38

      Hello, CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, "SI Projekte (*.3dsi)|*.3dsi |Alle Dateien (*.*)|*.*||", this); i only like to show my .3dsi files, but this only shows folders? Thanks, Mark

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      This way works.

      CFileDialog dlg(TRUE, "3dsi", "*.3dsi",
      OFN_HIDEREADONLY|OFN_FILEMUSTEXIST,
      "SI Projekte (*.3dsi)|(*.3dsi) |Alle Dateien (*.*)|*.*||",
      this);

      Maxwell Chen

      1 Reply Last reply
      0
      • M macmac38

        Hello, CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, "SI Projekte (*.3dsi)|*.3dsi |Alle Dateien (*.*)|*.*||", this); i only like to show my .3dsi files, but this only shows folders? Thanks, Mark

        J Offline
        J Offline
        jmkhael
        wrote on last edited by
        #3

        I call it like this char BASED_CODE szFilter[] = "3D SI Files (*.3dsi)|*.3dsi|All Files (*.*)|*.*||"; CFileDialog dlg(TRUE,"3dsi",NULL,OFN_ENABLESIZING|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY,szFilter,this); Papa while (TRUE) Papa.WillLove ( Bebe ) ;

        M 1 Reply Last reply
        0
        • J jmkhael

          I call it like this char BASED_CODE szFilter[] = "3D SI Files (*.3dsi)|*.3dsi|All Files (*.*)|*.*||"; CFileDialog dlg(TRUE,"3dsi",NULL,OFN_ENABLESIZING|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY,szFilter,this); Papa while (TRUE) Papa.WillLove ( Bebe ) ;

          M Offline
          M Offline
          Maxwell Chen
          wrote on last edited by
          #4

          "*.3dsi" should be passed as argument to the third parameter to select the clone, otherwise nothing would show. Maxwell Chen

          J 1 Reply Last reply
          0
          • M macmac38

            Hello, CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, "SI Projekte (*.3dsi)|*.3dsi |Alle Dateien (*.*)|*.*||", this); i only like to show my .3dsi files, but this only shows folders? Thanks, Mark

            M Offline
            M Offline
            macmac38
            wrote on last edited by
            #5

            allright, it works! Thanks, Mark

            1 Reply Last reply
            0
            • M Maxwell Chen

              "*.3dsi" should be passed as argument to the third parameter to select the clone, otherwise nothing would show. Maxwell Chen

              J Offline
              J Offline
              jmkhael
              wrote on last edited by
              #6

              The third parameter is "the initial filename that appears in the filename edit box. If NULL, no filename initially appears." He never said he wants something by default Papa while (TRUE) Papa.WillLove ( Bebe ) ;

              M 1 Reply Last reply
              0
              • J jmkhael

                The third parameter is "the initial filename that appears in the filename edit box. If NULL, no filename initially appears." He never said he wants something by default Papa while (TRUE) Papa.WillLove ( Bebe ) ;

                M Offline
                M Offline
                Maxwell Chen
                wrote on last edited by
                #7

                Specifying "*.3dsi" does not select any specific file by default. Originally I tested it with NULL as what you said, but no file appeared. So I looked at the example in MSDN, and found that something was required for the 3rd param. :) Maxwell Chen

                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