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. how can i open a file(.doc or .txt or .xsl) in a dialog in MFC?

how can i open a file(.doc or .txt or .xsl) in a dialog in MFC?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++xml
5 Posts 4 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.
  • D Offline
    D Offline
    dhanapackiyam
    wrote on last edited by
    #1

    i use CFile function .i can open the open dialog but icant able to open the file.

    N _ H 3 Replies Last reply
    0
    • D dhanapackiyam

      i use CFile function .i can open the open dialog but icant able to open the file.

      N Offline
      N Offline
      nisha00000
      wrote on last edited by
      #2

      CFile Lfile

      Lfile.open("D:\\sam.txt",CFile::Read);

      This kind of way open your file.......

      H 1 Reply Last reply
      0
      • D dhanapackiyam

        i use CFile function .i can open the open dialog but icant able to open the file.

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        You would need automation to do this.(For .doc and .xsl atleast) OLE Embedding See here[^]

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        1 Reply Last reply
        0
        • D dhanapackiyam

          i use CFile function .i can open the open dialog but icant able to open the file.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          You can opea and read files with CFile but for show files like xls or other files(jpg) you need to know detaily of these files (BasicExcel - A Class to Read and Write to Microsoft Excel [^]).

          1 Reply Last reply
          0
          • N nisha00000

            CFile Lfile

            Lfile.open("D:\\sam.txt",CFile::Read);

            This kind of way open your file.......

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            This is helpful for txt 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