Problem splitting child window in MFC MDI program
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 5 of 5

Thread: Problem splitting child window in MFC MDI program

Threaded View

  1. #1
    Join Date
    May 2002

    Problem splitting child window in MFC MDI program

    After months of searching, I finally found a post that outlines how to split a child window in an MFC MDI program.

    Splitting Child Window in MFC MDI Program

    For my purposes, this achievement is practically useless because I cannot find a way to pass text from one CRichEditView window to another.

    Given two CRichEditView windows, CInputViewView and COutputView as child windows in an MFC MDI app, my goal is to capture text in the former and print that text in the later using a button click.

    Using what appeared to me to be a logical way to proceed, I tried variations of the following code:
    void CMainFrame::DoSomething()
    	//MessageBox(_T("Like What ?"), _T("Do Something"));
    	//CInputViewView * pin = (CInputViewView*) GetActiveView();
    	CInputViewView * pin = (CInputViewView*)m_wndSplitter.GetPane(0,0);
    	//CInputViewView* pInVV = (CInputViewView*) CChildFrame
    	//long countChildren;
    	//CChildFrame * pChildFrm = (CChildFrame*) get_accChildCount(&countChildren); //this->GetAccessibleChild(VARIANT varChild, IDispatch **ppdispChild);
    	//pChildFrm->m_wndSplitter.GetPane(0, 1);
    	//CString cs;
    	//cs.Format(_T("countChildren = %d"), countChildren);
    None of this works and even the attempt to access the pane results in an app crash in winsplit.cpp.
    #ifdef _DEBUG
    void CSplitterWnd::AssertValid() const
    >	ASSERT(m_nMaxRows >= 1);
    Please see attached demo.
    Appreciate any help in accessing the panes from CMainFrame. Thanks
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center