InCmainframeClass to call member variablesM_wndsplitterOfGetpane ()Method to obtain the required view pointer and perform forced type conversion.
Or callCmainframe * pmainframe = (cmainframe *) Afxgetmainwnd ();GetCmainframeAnd then perform the same operation.
That is:
Cleftview * pview = (cleftview *) m_wndsplitter.getpane (0, 0 );
Pview-> gettreectrl ();
Or:
Cmainframe * pmainframe = (cmainframe *) afxgetmainwnd ();
* Pview1 = (cview1 *) pmainframe-> m_wndsplitter.getpane (0, 0 );
Cview1
Cview2
* Pview2 = (cview2 *) pmainframe-> m_wndsplitter.getpane (1, 0 );
If you do not split the view when creating a tree structure, you can perform the following operations:
Cleftview * pwnd = (cleftview *) mdigetactive ()-> getactiveview ();
Pwnd-> gettreectrl ();
Get the handle of the parent window
Getparent ();
Communication between windows after split:
Cmdichildwnd * pchild = (cmdichildwnd *) (cframewnd *) afxgetapp ()-> m_pmainwnd)-> getactiveframe ();