Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Prevent DockingPane from sizing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Prevent DockingPane from sizing

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


Joined: 25 May 2004
Location: Israel
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Irisz Quote  Post ReplyReply Direct Link To This Post Topic: Prevent DockingPane from sizing
    Posted: 25 May 2004 at 12:19am

Hi,

How do I prevent my DockingPane from sizing ? (I mean sizing by the user)

thanks,Iris.

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2004 at 12:58pm
This feature has now been added (9.51), take a look at the PaneSample.  Run the application and select Docking Pane-> Min Max Sample from the menubar.  If you would not like the pane to be sized, you can set both the min and max values to be the same and they won't be able to resize it.
Back to Top
stephen_hyc View Drop Down
Newbie
Newbie


Joined: 27 January 2005
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote stephen_hyc Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2005 at 7:37pm

But after you hide and then make it show , you will find you can resize it again.How to deal with it

Back to Top
mjm_d View Drop Down
Newbie
Newbie


Joined: 20 September 2005
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote mjm_d Quote  Post ReplyReply Direct Link To This Post Posted: 20 September 2005 at 4:52am

But after you floate, you will find you can resize it again.How to deal with it

Back to Top
Agent 007 View Drop Down
Newbie
Newbie
Avatar

Joined: 08 April 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Agent 007 Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2005 at 2:30pm

See the Min/Max layout in the Pane sample.  For Pane 2 in the OnCreate function comment out the line of code that prevents the Pane from closing.

// Get a pointer to IDR_PANE2 and set the title.
pPane = GetDockingPaneManager()->FindPane(IDR_PANE2);
ASSERT(pPane);
if (pPane)
{
    pPane->SetTitle(_T("Pane 2 - No Closeable\nPane 2"));
    // pPane->SetOptions(xtpPaneNoCloseable); // Comment out this line.
}

You will also have to remove the entry in the System Registry for the Pane sample.  Otherwise Pane 2 will still not be closeable.  This registry entry is  HK_CURRENT_USER->Software->Codejock Sample Applications->Codejock Docking Pane Sample. Run the application again and float pane 2.  Now close the pane.  Now Select the Menu item Docking Panes-Panes->Pane 2 to show Pane 2.  The pane is still not resizable. 

Back to Top
Agent 007 View Drop Down
Newbie
Newbie
Avatar

Joined: 08 April 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Agent 007 Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2005 at 2:47pm
An alternative method to get the sample to work is to comment out the LoadLayout coad to prevent the application from loading the info fro the system registry.  This code is in the OnCreate function in the CMainFrame Class.

// If "RunLayout" layout does not exist, save the current configuration
// as "RunLayout", otherwise load previous state.

m_pRunLayout = GetDockingPaneManager()->CreateLayout();
//if (!m_pRunLayout->Load(_T("RunLayout")))
//{
//     GetDockingPaneManager()->GetLayout(m_pRunLayout);
//}

Comment out the code shown above and then run the program and follow the steps posted above.

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.172 seconds.