Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Deeply nested controls do not resize properly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Deeply nested controls do not resize properly

 Post Reply Post Reply
Author
Message
isaac nilton View Drop Down
Newbie
Newbie


Joined: 17 August 2012
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote isaac nilton Quote  Post ReplyReply Direct Link To This Post Topic: Deeply nested controls do not resize properly
    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


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,


Back to Top
isaac nilton View Drop Down
Newbie
Newbie


Joined: 17 August 2012
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote isaac nilton Quote  Post ReplyReply Direct Link To This Post 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;
}
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.141 seconds.