Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - DockingPaneManager inside a CWnd
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DockingPaneManager inside a CWnd

 Post Reply Post Reply
Author
Message
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Topic: DockingPaneManager inside a CWnd
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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.188 seconds.