很多书都有。中文版的有《Visual C++ 技术内幕》。英文版的以微软随软件的资料<Visual C++ Tutorials>最好。除此之外,有一个最省力的方法:MSDN+VC Sample/MFC/Dialogs and Controls MFC Samples/Scribble,其中有Step1~Step7,这七步做完,估计你会对MFC的文档/视结构有一个比较深的了解。

解决方案 »

  1.   

    BRUCC ECHEL的THINKING IN C++讲得非常好!
      

  2.   

    要了解 文档、视图、框架窗口、文档模板之间的相互关系,关键要理解他们的结构1、首先应该对 CWinApp类有充分的了解
        它包含并管理着应用程序的文档/视窗的所有信息。它有一个成员变量 
        CDocManager * m_pDocManager,此变量是文档/视窗的管理器,m_templateList
        是CDocManager里的一个列表,此列表里保存了所有文档模板的指针,当用户调用
        CWinApp::AddDocTemplate( pDocTemplate ) 后该pDocTemplate存入了
        CWinApp::m_pDocManager::m_templateList里。
    CWinApp::GetFirstDocTemplatePosition()
    CWinApp::GetNextDocTemplate(POSITION& pos)
    是遍例所有的文档模板指针。2、上面我们提到了文档模板(CMultiDocTemplate(我们主要针对对文档)),
        这是一个极重要的类。CMultiDocTemplate::m_docList保存的所有该种文档的
        文档实例的指针列表。下面两个函数用于维护CMultiDocTemplate::m_docList数据
    CMultiDocTemplate::AddDocument(CDocument* pDoc);
    CMultiDocTemplate::RemoveDocument(CDocument* pDoc);

    CMultiDocTemplate::GetFirstDocPosition() const;
    CMultiDocTemplate::CDocument* GetNextDoc(POSITION& rPos) const;
    用于遍例该文档类型所有文档实例。3、上面提到文档(CDocument)
       CDocument 我们最熟悉不过了。每一个文档实例可有多个视与之相对应。
       CDocument::m_viewList用来保存所有与此文档实例相关的View
       CDocument::GetDocTemplate 可获得CMultiDocTemplate;
    4、CView 他是放在CMDIChildWnd里的,每一个CMDIChildWnd有一个View
       CView::GetDocument可获得与此视相关的CDocument
       CView::GetParentFrame() 可获得CMDIChildWnd;通过以上分析可见CWinApp,CMDIChildWnd,CView,CDocument,CMultiDocTemplate之间知道其中一个实例
    必可知道其他所有几个实例,CWinApp统领全局,任何时候,只要获得CWinApp实例,则所有的文档模板,
    文档实例,视,Frame窗口均可被枚举出来。AfxGetApp() 获得CWinApp实例指针。
      

  3.   

    大体是:在MFC自动生成的程序源码中,框架在总体上管理,视负责显示,如程序中有需要读、写文件等操作,由文档负责。相互之间可以传递数据。上面softdoctor的回答中已经说得很详细了。有一套微软的MFC编程的书,五卷本的,有中文版,其中第二本专门讲了这几者的相互关系,建议找来看看。
      

  4.   

    有一本台湾人侯俊杰写的书《深入浅出mfc编程》,里面对mfc的doc/view结构有深入
    的探讨
      

  5.   

        有一本台湾人侯俊杰写的书《深入浅出mfc编程》,里面对mfc的doc/view结构有深入
    的探讨,作者钻入mfc源代码内部,详细剖析了doc/view结构,是一本不可多得的好书,相信对你会有帮助。
      

  6.   

    cause an error occured like this:HTTP 错误 400
    400 请求出错
    由于语法格式有误,服务器无法理解此请求。不作修改,客户程序就无法重复此请求。
    so now i give my password to you all. all the people reply to me can gain 
    scores as what i said before.now i give a reference score as following:
    lookfar 10 Kenny 10  springsea 10 softdoctor 100 gyp 10 fht007 10
    all depends on whether i own the resources you recommended  and the depth
    of utility
    my password is dongliang
    you all can get the score ,but don't change the password.the later comer
    have the equal rights to gain score if he reply to me as you.
    thank you all!!!