CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Workspace Doc like VC++ 6.0

    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?


  2. #2
    Join Date
    Apr 1999
    Posts
    32

    Re: Workspace Doc like VC++ 6.0

    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




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured