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. Project / Workspace

Project / Workspace

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studioquestionworkspace
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.
  • R Offline
    R Offline
    Ryan B
    wrote on last edited by
    #1

    Has anyone ever programmed an application using a project/workspace model. I am writing an MFC / MDI applicaiton and I need to replicate the same idea that VS uses. The user will be working with a collection of documents. Are there any articles / tutorials that anyone knows of? Ryan Baillargeon

    R R 2 Replies Last reply
    0
    • R Ryan B

      Has anyone ever programmed an application using a project/workspace model. I am writing an MFC / MDI applicaiton and I need to replicate the same idea that VS uses. The user will be working with a collection of documents. Are there any articles / tutorials that anyone knows of? Ryan Baillargeon

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      Ryan B. wrote: ever programmed an application using a project/workspace model Yes, I'm currently doing this.

      • The app I'm working on consumes XML files. The "project" file is just another XML file that refers to the files in the project, as well as some project-wide properties. I use Xerces to parse XML.
      • But you don't have to do this using XML - a simple approach is to use .INI files that basically do the same thing.
      • A third approach is to represent the "project" object using a binary format that's serialized by your app. This is the least user-friendly way to represent a project but may be appropriate for your app.

      /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

      1 Reply Last reply
      0
      • R Ryan B

        Has anyone ever programmed an application using a project/workspace model. I am writing an MFC / MDI applicaiton and I need to replicate the same idea that VS uses. The user will be working with a collection of documents. Are there any articles / tutorials that anyone knows of? Ryan Baillargeon

        R Offline
        R Offline
        Roman Fadeyev
        wrote on last edited by
        #3

        What's the problem? Create CProjectDoc class derived from CDocument, create CProjectDocTemplate from CDocTemplate. The document tree is your project view. Then you are creating some interface for you class, something likes as void AddToProject(LPCTSTR szFileName) void RemoveFromProject(LPCTSTR szFile) and etc. The project is a simplest type of document I have ever seen. Then, workspace's scheme: If you want use same tree for all open projects, you must refuse to use view in CProjectDoc. Point to MFC that you document has no any views

        void CProjectDocTemplate::InitialUpdateFrame(CFrameWnd* pFrame, CDocument* pDoc,BOOL bMakeVisible)
        {
        // __super :: InitialUpdateFrame(pFrame, pDoc, bMakeVisible);
        pFrame->DestroyWindow();
        }

        and create separate window (of course, docked :) to a hair's breadth as microsoft - chief of fashion) and scan all projects and show their contents as you wish. I had once similar project and i don't mind to share it with you, but it is simpler to make it on its own than to ransack some thousands lines of foreign code

        R 1 Reply Last reply
        0
        • R Roman Fadeyev

          What's the problem? Create CProjectDoc class derived from CDocument, create CProjectDocTemplate from CDocTemplate. The document tree is your project view. Then you are creating some interface for you class, something likes as void AddToProject(LPCTSTR szFileName) void RemoveFromProject(LPCTSTR szFile) and etc. The project is a simplest type of document I have ever seen. Then, workspace's scheme: If you want use same tree for all open projects, you must refuse to use view in CProjectDoc. Point to MFC that you document has no any views

          void CProjectDocTemplate::InitialUpdateFrame(CFrameWnd* pFrame, CDocument* pDoc,BOOL bMakeVisible)
          {
          // __super :: InitialUpdateFrame(pFrame, pDoc, bMakeVisible);
          pFrame->DestroyWindow();
          }

          and create separate window (of course, docked :) to a hair's breadth as microsoft - chief of fashion) and scan all projects and show their contents as you wish. I had once similar project and i don't mind to share it with you, but it is simpler to make it on its own than to ransack some thousands lines of foreign code

          R Offline
          R Offline
          Ryan B
          wrote on last edited by
          #4

          The confusing part for me is that this is my first Document/View application and I am working from limited resources. Your suggestions are very helpful and I was already heading in that direction. Thank you. Ryan Baillargeon Software Specialist Fuel Cell Technologies Inc.

          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