I am trying to access a view inside a splitter from my mainframe. At the moment I have this:
CWnd* pView = m_wndSplitter.GetPane( 0, 0 );
However this gets me a pointer to the CWnd not the CMyViewClass object.
Can anyone explain to me what I need to do in order to access the view object itself so I can access member functions in the form pView->ViewFunction(…);
Just cast it:
or:
If you know that the view in pane
0,0will always be of typeCMyViewClass, then you could just usestatic_cast… but i recommend you don’t – no sense risking problems should you ever change your layout.