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. Open A File Just Like MS Word Does

Open A File Just Like MS Word Does

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharpvisual-studioperformancehelp
5 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.
  • D Offline
    D Offline
    dliviu
    wrote on last edited by
    #1

    Hello! I'm working on an application similar to MS Word, but on a much smaller scale. My problem is that I do not know how to open a file just like Word does. Word does something like this: if you are already in Word and you opened a file already and then you open another one from the file menu, than a new application appears with this file opened, just like the first file. But this application does not open a new WINWORD.EXE app. No matter how many files you open there's still just one WINWORD.EXE. So, I want to do exactly like this in my application, but I don't know how! If Word does not open a new app with the opening of a new file, this means that somehow the new interface opened with the file is linked with the initial dlls or with the files that have been loaded in memory. I don't have a clue how to do that. I'm working in C++, Visual Studio 2005, MFC. Anybody has any idea? Thanks!

    D _ 2 Replies Last reply
    0
    • D dliviu

      Hello! I'm working on an application similar to MS Word, but on a much smaller scale. My problem is that I do not know how to open a file just like Word does. Word does something like this: if you are already in Word and you opened a file already and then you open another one from the file menu, than a new application appears with this file opened, just like the first file. But this application does not open a new WINWORD.EXE app. No matter how many files you open there's still just one WINWORD.EXE. So, I want to do exactly like this in my application, but I don't know how! If Word does not open a new app with the opening of a new file, this means that somehow the new interface opened with the file is linked with the initial dlls or with the files that have been loaded in memory. I don't have a clue how to do that. I'm working in C++, Visual Studio 2005, MFC. Anybody has any idea? Thanks!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      dliviu wrote:

      So, I want to do exactly like this in my application, but I don't know how!

      You want to look into SDI.

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

      D 1 Reply Last reply
      0
      • D David Crow

        dliviu wrote:

        So, I want to do exactly like this in my application, but I don't know how!

        You want to look into SDI.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

        D Offline
        D Offline
        dliviu
        wrote on last edited by
        #3

        Thank you very much!

        1 Reply Last reply
        0
        • D dliviu

          Hello! I'm working on an application similar to MS Word, but on a much smaller scale. My problem is that I do not know how to open a file just like Word does. Word does something like this: if you are already in Word and you opened a file already and then you open another one from the file menu, than a new application appears with this file opened, just like the first file. But this application does not open a new WINWORD.EXE app. No matter how many files you open there's still just one WINWORD.EXE. So, I want to do exactly like this in my application, but I don't know how! If Word does not open a new app with the opening of a new file, this means that somehow the new interface opened with the file is linked with the initial dlls or with the files that have been loaded in memory. I don't have a clue how to do that. I'm working in C++, Visual Studio 2005, MFC. Anybody has any idea? Thanks!

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          If you're using MFC, you can find an option in the project wizard called Multiple top-level documents under Application type. If not, what you need to do is to create a new UI thread each time a new file is opened.

          «_Superman_»  _I love work. It gives me something to do between weekends.

          _Microsoft MVP (Visual C++) (October 2009 - September 2013)

          Polymorphism in C

          D 1 Reply Last reply
          0
          • _ _Superman_

            If you're using MFC, you can find an option in the project wizard called Multiple top-level documents under Application type. If not, what you need to do is to create a new UI thread each time a new file is opened.

            «_Superman_»  _I love work. It gives me something to do between weekends.

            _Microsoft MVP (Visual C++) (October 2009 - September 2013)

            Polymorphism in C

            D Offline
            D Offline
            dliviu
            wrote on last edited by
            #5

            I'm using MFC. Thanks for the suggestion.

            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