Click to See Complete Forum and Search --> : Workspace Doc like VC++ 6.0


July 4th, 1999, 07:42 PM
I am writing a document class similar to the workspace in VC++ 6.0. I'm not sure if the document should be part of the document template or not since there is no frame associated with it. Can I have a document be part of the document template without a frame, or do I need to open it somehow outside of the document template?

James Dunning
July 28th, 1999, 09:27 AM
easiest way it to create a CDummyFrame derived from CMDIChildWnd, override the virtual function void ActivateFrame, and hide it by default.. now all you need to do, is your DockView to the Document

Then add it to your App document template...

CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_MyTYPE,
RUNTIME_CLASS(CMyDoc),
RUNTIME_CLASS(CDummyFrame), // custom MDI child frame
RUNTIME_CLASS(CMyView));
AddDocTemplate(pDocTemplate);

Hope this helps.... if you have come up with any better ways of doing this, plz let me know..

James