CSplitterWnd flip between horizonal and vertical splitter?
- by buttercup
Hi,
Suppose I have a splitter with 2 rows.
--------
| |
--------
| |
--------
How do I make it to this
---------
| | |
| | |
| | |
---------
switch from horizontal split to vertical split
without having to re-create the whole splitter?
Code is:
if (!m_wndSplitter.CreateStatic(this, 1, 2, WS_CHILD|WS_VISIBLE))
{
TRACE0("Failed to create splitter window\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CWnd), CSize(200, 100), NULL))
{
TRACE0("Failed to create CView1\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 2, RUNTIME_CLASS(CWnd), CSize(500, 100), NULL))
{
TRACE0("Failed to create CView2\n");
return FALSE;
}