Print Page | Close Window

Nasty side effect of changes in CXTPSplitterWnd

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=19004
Printed Date: 25 June 2025 at 2:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Nasty side effect of changes in CXTPSplitterWnd
Posted By: mihey
Subject: Nasty side effect of changes in CXTPSplitterWnd
Date 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 http://www.nicetec.de -  

XTP15.1.3, VS10, Win7




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net