how to limit a floating pane from being resized |
Post Reply |
Author | |
steph
Newbie Joined: 07 June 2011 Location: Canada Status: Offline Points: 7 |
Post Options
Thanks(0)
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
|
|
sdancer75
Groupie Joined: 08 July 2008 Location: Greece Status: Offline Points: 70 |
Post Options
Thanks(0)
|
I am looking for that too. Did you find any solution ?
|
|
Just me!
|
|
steph
Newbie Joined: 07 June 2011 Location: Canada Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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
|
|
steph
Newbie Joined: 07 June 2011 Location: Canada Status: Offline Points: 7 |
Post Options
Thanks(0)
|
By the way the previous solution comes from Code jock themselves.
|
|
steph
|
|
sdancer75
Groupie Joined: 08 July 2008 Location: Greece Status: Offline Points: 70 |
Post Options
Thanks(0)
|
Thank you for your reply. I will try your solution.
Best Regards, George |
|
Just me!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |