CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    1

    How to resize the column width in a splitterwindow

    Hi,
    I have some problems with my splitterwindow (static, 3 columns, 1 Row):


    BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
    CCreateContext* pContext)
    {
    // create splitter window
    if (!m_wndSplitterR.CreateStatic(this, 1, 2))
    return FALSE;

    if(!m_wndSplitterLM.CreateStatic(&m_wndSplitterR, 1, 2, WS_CHILD | WS_VISIBLE, m_wndSplitterR.IdFromRowCol (0, 0)))
    return FALSE;

    if (!m_wndSplitterLM.CreateView(0, 0, RUNTIME_CLASS(ViewLinks), CSize(1, 1), pContext) ||
    !m_wndSplitterLM.CreateView(0, 1, RUNTIME_CLASS(ViewMitte), CSize(1, 1), pContext))
    {
    m_wndSplitterLM.DestroyWindow();
    return FALSE;
    }
    if(!m_wndSplitterR.CreateView(0, 1, RUNTIME_CLASS(ViewRechts), CSize(1, 1), pContext) )
    {
    m_wndSplitterR.DestroyWindow();
    return FALSE;
    }

    WINDOWPLACEMENT wind;
    wind.flags=SW_SHOWMAXIMIZED;

    m_wndSplitterR.SetColumnInfo (0, 350, 100);
    m_wndSplitterLM.SetColumnInfo (0, 140, 100);
    //GetCtivePane();
    return TRUE;
    }



    The problem. I want to resize the middle pane but how? If I change the values of m_wndSplitterR or m_wndSplitterLM (SetColumnInfo(...)) I only can change the left and right column.


  2. #2
    Guest

    Re: How to resize the column width in a splitterwindow

    Why don't you try

    CWnd pWnd* = m_wndSplitterLM.GetPane (0, 0); //should be the middle pane
    pWnd->SetWindowPos(...) //old coordinates except of the x and/or y coordinate





Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured