Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - Nasty side effect of changes in CXTPSplitterWnd
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Nasty side effect of changes in CXTPSplitterWnd

 Post Reply Post Reply
Author
Message
mihey View Drop Down
Groupie
Groupie
Avatar

Joined: 14 May 2003
Location: Germany
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mihey Quote  Post ReplyReply Direct Link To This Post Topic: Nasty side effect of changes in CXTPSplitterWnd
    Posted: 30 September 2011 at 7:55am

Hello everyone!

 

Since I’ve upgraded my project from XTP 15.0.2 to 15.1.3 I have problem with nested splitters. In this case resizing of splitters did not work properly.

For reproducing this problem you can take SplitterWindow example from the XTP installation package and replace CMainFrame::OnCreateClient method with the following code.

 

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)

{

      if (!m_wndSplitter.CreateStatic(this, 1, 2))

      {

            TRACE0("Failed to create splitter window\n");

            return FALSE;

      }

 

      if (!m_wndSplitter1.CreateStatic(&m_wndSplitter,     

            2, 1,                                          

            WS_CHILD | WS_VISIBLE | WS_BORDER,                   

            m_wndSplitter.IdFromRowCol(0, 0))) 

      {

            TRACE0("Failed to create nested splitter\n");

            return FALSE;

      }

 

 

      m_wndSplitter1.CreateView(0,0, RUNTIME_CLASS(CView2), CSize(20, 20), pContext);

      m_wndSplitter1.CreateView(1, 0,  RUNTIME_CLASS(CView3), CSize(0, 0), pContext);

 

      m_wndSplitter.CreateView(0, 1,  RUNTIME_CLASS(CView1), CSize(0, 0), pContext);

      CRect r;

      GetClientRect(&r);

      m_wndSplitter.SetRowInfo( 0, r.Height()/2, 0 );

      m_wndSplitter.SetColumnInfo( 0, r.Width()/2, 0 );

      return TRUE;

}

 

The member m_wndSplitter1 has to be defined the MainFrm.h header.

CXTPSplitterWnd  m_wndSplitter1;

 

In this example you can see that the vertical splitter can’t be resized.

 

It would be great if you have any fix or workaround for the problem. 

Best regards,

Mikhail Tyukin www.nicetec.de 

XTP15.1.3, VS10, Win7

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.108 seconds.