Print Page | Close Window

DockingPaneManager inside a CWnd

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=9362
Printed Date: 27 September 2024 at 9:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DockingPaneManager inside a CWnd
Posted By: adrien
Subject: DockingPaneManager inside a CWnd
Date Posted: 20 January 2008 at 10:16pm
For some reason we want to be able to dock panes inside a CWnd object (this is because this CWnd is the container for the client part of a frame window provided in another DLL module).
 
So, we added a CXTPDockingPaneManager member to the CWnd, and we call CreatePane on it.
 
However, there is no message XTP_DPN_SHOWWINDOW called.
 
I believe this is because CXTPDockingPane::ShowWindow is not called, and I believe this is called because m_bLayoutCreated is not TRUE yet, because WM_SIZEPARENT is not sent by default to a CWnd.
 
Is there any recommended steps to take to get a docking pane manager to work inside any generic CWnd?
 
Thanks
 
Adrien
 
PS CJ 11.2.2



Replies:
Posted By: Oleg
Date Posted: 21 January 2008 at 2:14am
Add OnSize handler and add this code:
 
(from Samples\DockingPane\DialogPanes sample)
 
void CDialogPanesDlg::OnSize(UINT nType, int cx, int cy)
{
 CDialog::OnSize(nType, cx, cy);
 
 CRect rcClient(0, 0, cx, cy);
 RepositionBars(0, 0xffff, AFX_IDW_PANE_FIRST, 0, 0, &rcClient);
 RepositionBars(0, 0xffff, AFX_IDW_PANE_FIRST, reposQuery, &rcClient, &rcClient);
 if (m_wndView.GetSafeHwnd())
 { 
  m_wndView.MoveWindow(rcClient);
 } 
}
 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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