Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Regarding Width of the docking pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Regarding Width of the docking pane

 Post Reply Post Reply
Author
Message
terminator_123 View Drop Down
Newbie
Newbie


Joined: 29 October 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote terminator_123 Quote  Post ReplyReply Direct Link To This Post Topic: Regarding Width of the docking pane
    Posted: 24 April 2009 at 6:59am

Hi All,

I have a question regarding the width of docking panes in normal and docked states.
If we create a docking pane with width W and dock it to left side by clicking the pin icon, it seems that the pane width gets shrunk by 4 pixels.
But once I pin the pane back by clicking on the icon again, the width will again be reset to W. Is there any way to correctly get the width of the
pane even in unpinned/docked state ? Please refer the code below:

// creation of docking pane with width = nWidth. Assume m_panemanager is of type CXTPDockingPaneManager
CXTPDockingPane* pTOCListPane = m_paneManager.CreatePane(IDR_PANE_OPTIONS, CRect(0, 0, nWidth, 0), xtpPaneDockLeft);

// before docking/unpinning if we query width using this code we get nWidth correctly
            CRect cRect(0,0,0,0);
            cRect = pTOCListPane->GetPaneWindowRect ();
            int nWidth = cRect.Width();

// but after docking/unpinning, we get width as ( nWidth - 4 )

Can any one suggest alternative to using +4 as offset.

Thanks,
Pavan

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.