- Splitter WIndow, how to refer to the mainframe and another peer pane from a pane??
- Posted by Liu Ju on October 21st, 2004
Dear friends:
I create a splitter window including two columns and 1 row.(pane 1 and pane 2)
From the class of pane 1 how can I refer to the pane 2 and the mainframe.
I did try to use the codes in the class of pane 1.
CWnd* MainFrame;
MainFrame=GetWindow(GW_OWNER);
But when I debug the MainFrame is nothing.
Plze do help!!
Thanks
- Posted by Scott McPhillips [MVP] on October 21st, 2004
Liu Ju wrote:
CMainframe* pmain = (CMainFrame*)AfxGetMainWnd();
CPane2* pp2 = (CPane2*)pmain->m_splitter.GetPane(0,1);
This method of getting a pointer to pane2 is not very good practice. It
is usually recommended that you use UpdateAllViews to communicate
between views, so they will not have dependencies on each other.
--
Scott McPhillips [VC++ MVP]
Similar Posts
- show "Folder" pane on left side of Internet Explorer window (Windows Media Center Edition) by Khoshravan
- Recycle Bin Left Window Pane (Microsoft Windows) by Philip K.
- OE 6 Address Book Intact But No Longer Populates My Contact List in Left Window Pane (Computers & Technology) by geermeister@gmail.com
- Urgently!! Errors with Spliter Window when a pane is in the type of CFormView??? plz help (Development Resources) by Liu Ju
- Preview Pane (Virus & Worms) by Sam

