Technocrat
Dec 12th, 2000, 06:18 PM
Can someone help me get my splinttered windows to like:
(Since this board takes out large spaces I can make an example) But I would like to have one frame on the top, two frames in the middle and one frame on the bottom. Kind of like the default look for MSVC++
I can get most of it but when I add the bottom frame it always crashs on me. Here is what I have so far
if (!m_wndSplitter.CreateStatic(this, 2, 1))
{
TRACE0("Failed to CreateStaticSplitter\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 0,pContext->m_pNewViewClass, CSize(400, 50), pContext))
{
TRACE0("Failed to create first pane\n");
return FALSE;
}
if (!m_wndSplitter2.CreateStatic(
&m_wndSplitter, // our parent window is the first splitter
1, 2, // the new splitter is 1 rows, 3 column
WS_CHILD | WS_VISIBLE | WS_BORDER, // style, WS_BORDER is needed
m_wndSplitter.IdFromRowCol(1, 0)
// new splitter is in the first row, 2nd column of first splitter
))
{
TRACE0("Failed to create nested splitter\n");
return FALSE;
}
// now create the two views inside the nested splitter
int cxText = lpcs->cx / 2; // width of text pane
int cyText = lpcs->cy / 2; // Height
if (!m_wndSplitter2.CreateView(0, 0,
pContext->m_pNewViewClass, CSize(cxText,0), pContext))
{
TRACE0("Failed to create second pane\n");
return FALSE;
}
if (!m_wndSplitter2.CreateView(0, 1,
pContext->m_pNewViewClass, CSize(cxText, 0), pContext))
{
TRACE0("Failed to create third pane\n");
return FALSE;
}
Can anyone help. Code would be nice. Thanks
(Since this board takes out large spaces I can make an example) But I would like to have one frame on the top, two frames in the middle and one frame on the bottom. Kind of like the default look for MSVC++
I can get most of it but when I add the bottom frame it always crashs on me. Here is what I have so far
if (!m_wndSplitter.CreateStatic(this, 2, 1))
{
TRACE0("Failed to CreateStaticSplitter\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 0,pContext->m_pNewViewClass, CSize(400, 50), pContext))
{
TRACE0("Failed to create first pane\n");
return FALSE;
}
if (!m_wndSplitter2.CreateStatic(
&m_wndSplitter, // our parent window is the first splitter
1, 2, // the new splitter is 1 rows, 3 column
WS_CHILD | WS_VISIBLE | WS_BORDER, // style, WS_BORDER is needed
m_wndSplitter.IdFromRowCol(1, 0)
// new splitter is in the first row, 2nd column of first splitter
))
{
TRACE0("Failed to create nested splitter\n");
return FALSE;
}
// now create the two views inside the nested splitter
int cxText = lpcs->cx / 2; // width of text pane
int cyText = lpcs->cy / 2; // Height
if (!m_wndSplitter2.CreateView(0, 0,
pContext->m_pNewViewClass, CSize(cxText,0), pContext))
{
TRACE0("Failed to create second pane\n");
return FALSE;
}
if (!m_wndSplitter2.CreateView(0, 1,
pContext->m_pNewViewClass, CSize(cxText, 0), pContext))
{
TRACE0("Failed to create third pane\n");
return FALSE;
}
Can anyone help. Code would be nice. Thanks