Print Page | Close Window

how to limit a floating pane from being resized

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=18543
Printed Date: 18 April 2024 at 1:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to limit a floating pane from being resized
Posted By: steph
Subject: how to limit a floating pane from being resized
Date Posted: 13 June 2011 at 6:02pm
Currently if I use the CXTPDockingPane::SetEnabled() function and passes the value xtpPaneEnableClient or xtpPaneDisabled as the parameter. The docking pane cannot be docked or moved. but when floating, it can easily be resized. How can I limit the user from resizing a CXTPDockingPane.

-------------
steph



Replies:
Posted By: sdancer75
Date Posted: 05 July 2011 at 11:57am
I am looking for that too. Did you find any solution ?

-------------
Just me!


Posted By: steph
Date Posted: 12 July 2011 at 7:44am
There is 2 solutions:

Solution 1:

1. Run DockingContainers - it show how to use custom contaiers.
2. For CDockingPaneMiniWnd (it is container for Floating window) add


BEGIN_MESSAGE_MAP(CDockingPaneMiniWnd, CXTPDockingPaneMiniWnd) ...
ON_WM_NCHITTEST_EX()
END_MESSAGE_MAP()

LRESULT CDockingPaneMiniWnd::OnNcHitTest(CPoint point) { LRESULT ht = CXTPDockingPaneMiniWnd::OnNcHitTest(point);
if (ht >= HTSIZEFIRST && ht <= HTSIZELAST)
ht = HTCLIENT;
return ht;
}


or Solution 2

if you just need some pane to restrict size use

pPane->SetMinTrackSize(sz) and pPane->SetMaxTrackSize(sz)


-------------
steph


Posted By: steph
Date Posted: 12 July 2011 at 7:44am
By the way the previous solution comes from Code jock themselves.

-------------
steph


Posted By: sdancer75
Date Posted: 19 July 2011 at 2:43am
Thank you for your reply. I will try your solution.

Best Regards,
George


-------------
Just me!



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