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