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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. I need to browse a folder only for rtf files

I need to browse a folder only for rtf files

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

    I need to browse a folder only for rtf files, i'm not interested in other files like image,etc.How can i do this?and also i need to search for a specific folder, not file like My Documents,in order to get the path.SHGetFolderLocation( or something like this) doesn't work.How can i do this?Thanks a lot.

    D 1 Reply Last reply
    0
    • F Filomela

      I need to browse a folder only for rtf files, i'm not interested in other files like image,etc.How can i do this?and also i need to search for a specific folder, not file like My Documents,in order to get the path.SHGetFolderLocation( or something like this) doesn't work.How can i do this?Thanks a lot.

      D Offline
      D Offline
      Dreamz
      wrote on last edited by
      #2

      I need to browse a folder only for rtf files, i'm not interested in other files like image,etc. > static char BASED_CODE szFilter[] = "RTF Files (*.rtf)|*.rtf||"; CFileDialog BrowseDlg(TRUE,NULL,NULL,OFN_FILEMUSTEXIST,szFilter,NULL); BrowseDlg.DoModal();

      B F 2 Replies Last reply
      0
      • D Dreamz

        I need to browse a folder only for rtf files, i'm not interested in other files like image,etc. > static char BASED_CODE szFilter[] = "RTF Files (*.rtf)|*.rtf||"; CFileDialog BrowseDlg(TRUE,NULL,NULL,OFN_FILEMUSTEXIST,szFilter,NULL); BrowseDlg.DoModal();

        B Offline
        B Offline
        Branislav
        wrote on last edited by
        #3

        Add before DoModal something like this: BrowseDlg.m_ofn.lpstrInitialDir = "c:\\windows"; // choice your path

        1 Reply Last reply
        0
        • D Dreamz

          I need to browse a folder only for rtf files, i'm not interested in other files like image,etc. > static char BASED_CODE szFilter[] = "RTF Files (*.rtf)|*.rtf||"; CFileDialog BrowseDlg(TRUE,NULL,NULL,OFN_FILEMUSTEXIST,szFilter,NULL); BrowseDlg.DoModal();

          F Offline
          F Offline
          Filomela
          wrote on last edited by
          #4

          I'm sorry.I have forgotten to say that i need this in SHBrowseForFolder.I need to browse only for rtf files.

          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