How is the CSPLITTERWND how to contact CDocument (Attach)?

xiaoxiao2021-03-06  69

In function BOOL CreateView (int row, int col, CRuntimeClass * pViewClass, SIZE sizeInit, CCreateContext * pContext); in a parameter CCreateContext * pContext, which has the current pointer in the document in OnCreate CView: // if ok Wire in the current document assert (m_pdocument == null); ccreatecontext * pContext = (ccreatecontext *) lpcs-> lpcreateParams;

// A view should be created in a given context if (pContext = NULL && pContext-> m_pCurrentDoc = NULL!!) {PContext-> m_pCurrentDoc-> AddView (this); ASSERT (m_pDocument = NULL!);}! Is, Calls AddView here. OK, That's it.

转载请注明原文地址:https://www.9cbs.com/read-110464.html

New Post(0)