Objective Grid: How do I place a record-info beam in the lower pane of a static splitter window?

Article ID: 689
Last updated: 11 Jun, 2018
Article ID: 689
Last updated: 11 Jun, 2018
Revision: 4
Views: 1571
Posted: 12 Jan, 2001
by Meltreger B.
Updated: 11 Jun, 2018
by Meltreger B.

Problem


How do I place a record-info beam in the lower pane of a static splitter window?
 


Cause



Action


Do this in your MDIChildWnd's OnCreateClient():
 

BOOL CRecordStatusMDIChildWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
m_pWndSplitter = new CSplitterWnd;
m_pWndSplitter->CreateStatic(this, 2, 1);

// Creates the TabWnd object
if (!m_pWndSplitter->CreateView(0, 0, RUNTIME_CLASS(CEditView), CSize(0, (lpcs->cy / 2)), pContext))
{

TRACE(Failed to create pane );
return FALSE;
}

if (!m_pWndSplitter->CreateView(1, 0, RUNTIME_CLASS(CGXRecordInfoWnd), CSize(0, (lpcs->cy / 2)), pContext))
{

TRACE(Failed to create pane );
return FALSE;
}

m_pWndRecordInfo = (CGXRecordInfoWnd*) m_pWndSplitter->GetPane(1, 0);

return m_pWndRecordInfo->Create(m_pWndSplitter, pContext, WS_CHILD|WS_HSCROLL|WS_VSCROLL);

}

Note that you have to create a CGXRecordInfoWnd class for the lower pane. The CGXRecordInfoSplitterWnd class is itself a dynamic splitter window and does not cooperate well when embedded into another splitter window.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 689
Last updated: 11 Jun, 2018
Revision: 4
Views: 1571
Posted: 12 Jan, 2001 by Meltreger B.
Updated: 11 Jun, 2018 by Meltreger B.

Others in this category