Deeply nested controls do not resize properly |
Post Reply |
Author | |
isaac nilton
Newbie Joined: 17 August 2012 Status: Offline Points: 2 |
Post Options
Thanks(0)
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, |
|
isaac nilton
Newbie Joined: 17 August 2012 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
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; }
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |