Print Page | Close Window

Deeply nested controls do not resize properly

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=20063
Printed Date: 19 April 2024 at 1:55am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Deeply nested controls do not resize properly
Posted By: isaac nilton
Subject: Deeply nested controls do not resize properly
Date Posted: 17 August 2012 at 6:41am
Hi,

In our APP we have a lot of nested CJ Controls, mostly panes, inside panes, collapsing and expanding and at the end of the chain( sometimes down to 5 levels of panes ) we have one control that is ours.  
When I resize the application( Main window ), or top levels panes, some of the controls near the end of the chain won't paint or resize properly, both CJ and our controls.

The chain is something like this

XTPFrameWindow
XTPDockingPaneManager
XTPDockingPaneTabbedContainer
FrameWindow
XTPDockingPaneManager
XTPDockingPaneTabbedContainer
(...)
XTPDockingPaneTabbedContainer
FrameWindow
XTPDockingPaneManager 
XTPDockingPaneTabbedContainer
(...)

It then repeats several times, depending on the how the end user design it at runtime, I put no limitation of how deep this chain could repeat it self.

After several days of investigation I found out that probably the cause is a limitation from Windows Kernel, not a bug from my APP or CJ

http://support.microsoft.com/kb/953934 - http://support.microsoft.com/kb/953934

But the solution seems to require a non standard implementation. :-)

I'm not quite sure how to do it with the old MFC in Visual C++ 6.0 and Codejock 13.

Does CJ have any upgrade or any ideia for a solution ? 

Best regards,





Replies:
Posted By: isaac nilton
Date Posted: 21 August 2012 at 7:52am
Found a solution, seems to be working but i'm not sure it's the right one...


void CMyFrameWnd::OnWindowPosChanged(WINDOWPOS* lpwndpos)
{
if ( lpwndpos == &m_wndPos )
Default();
else
{
memcpy( &m_wndPos, lpwndpos, sizeof( WINDOWPOS ) );
PostMessage( WM_USER_POSTWINDOWPOSTCHANGED, 0, (LPARAM)&m_wndPos );
}
}


LRESULT CMyFrameWnd::OnPostWindowPosChanged( WPARAM w, LPARAM l )
{
WINDOWPOS *lpwndpos = (WINDOWPOS*)l;
WNDPROC  wndProc = (WNDPROC)GetWindowLongPtrW(GetSafeHwnd(), GWLP_WNDPROC);
LRESULT lResult  = ::CallWindowProc(wndProc, GetSafeHwnd(), WM_WINDOWPOSCHANGED, 0, (LPARAM)lpwndpos);
return lResult;
}



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