Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Fixing Size of CXTPDockingPane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Fixing Size of CXTPDockingPane

 Post Reply Post Reply
Author
Message
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Topic: Fixing Size of CXTPDockingPane
    Posted: 20 February 2007 at 6:38am
Hallo
 
I know there are various topics about sizing CXTPDockingPanes, but I cannot resolve an issue I have. I have a CXTPDockingPane derived class (CDockingPane) and I want to force the size of the pane to be fixed, when docked. When the pane is docked to the bottom of my application, it 'grows' to fit the avaiable space, even though I have called

pPane->SetMinTrackSize(s);

pPane->SetMaxTrackSize(s);
 
to 'fix' the size of the pane. The height of the docked pane is many times higher than the maximum height set using SetMaxTrackSize which uses up valuable space in my client area. How can a force the docked size to be a specific value.
 
Thanks
 
Anton
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2007 at 7:04am
Further to this problem (everything here seems related), but I am unable to resize a CXTPDockingPane derived class correctly. I need to resize a floating pane IMMEDIATLY e.g. set it's new size. I have tried may combinations of SetMinTrackSize, SetMaxTrackSize, RedrawPane, RedrawFramesLayout etc. but cannot seem to be to force the size of a floating pane.
 
PLEASE HELP!
 
Anton
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2007 at 12:05am

Any progress on this?. I have implemented a number of exciting new features in our software, based on Xtreme Toolkit, but there still seem to be what appears to be some basic issues that is stalling development.

 

Thanks

Anton

Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2007 at 11:50am
Hi,

after calling pPane->SetMinTrackSize();
call pXtpDockingPanemanager->RecalcFramesLayout(). This will resize your pane immediately.
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2007 at 12:01pm
Akur
 
Sorry - tried this and many other combinations and it does not work! I have a function called InitSize which can set either the Min, Max (or both) tracking sizes. It does not resize immediatly (which is what I want), but will resize when the users clicks on the edges of the pane and it will then 'snap' to the correct size. I have called RedrawPane, RecalcFrameLayout, RecalcFramesLayout - but no luck. I can attach the function if you want.
 
Anton
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2007 at 12:16pm

void CMainFrame::InitSize(CDockingPane *pPane,CWnd *pWnd,bool SetInitSize,UINT Flag,CSize NewSize)

{

CRect c;

CSize s;

if (IsWin(pWnd)) // set size to a given window

{

pWnd->GetClientRect(&c);

s.cx = c.Width();

s.cy = c.Height();

}

else if (NewSize != CSize(-1,-1)) // set size to passed parameters

s = NewSize;

if (Flag == SET_PANE_MIN_TRACK) // set minimum size

{

pPane->SetMinTrackSize(s);

pPane->SetMaxTrackSize(CSize(32000,32000));

}

else if (Flag == SET_PANE_MAX_TRACK) // set maximin size

{

pPane->SetMinTrackSize(CSize(0,0));

pPane->SetMaxTrackSize(s);

}

else if (Flag == SET_PANE_MINMAX_TRACK) // set min and max

{

pPane->SetMinTrackSize(s);

pPane->SetMaxTrackSize(s);

}

if (SetInitSize) // save the original size

pPane->DialogSize = s;

// user various combinations of RecalcFramesLayout, RedrawPane etc. here - no effect!

}

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: 26 February 2007 at 4:13am
Hello,
 
Show code where you create all panes and set its max size.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2007 at 12:00am
Oleg
 
I have tried that. The problem is quite complex depending on the requirements of the particular pane (and the contents) of it. If I set the maxsize, then it does fix the size issue when a pane is floated, BUT then when I dock it again, depending on which side of the client area it is being docked, it 'shrinks' to the max size, which makes (for instance) the bottom pane area HUGE, which only then shows a small client area. My application, being a CAD system, requires the client area to be as large as possible at all times, to allow the user a proper view of a drawing. As I said, I can fix it in one way, but then it breaks something else. I only have the issue with some of my docking panes, containing typically a dialog resource (which might only be a few controls in size - e.g. small).
 
So, basically I need to set max size when it floats, but then need to reset maxsize to a large value, BEFORE it docks (e.g. via an action). I have tried this, but it still does not work - any further suggstions?
 
Thanks
 
Anton
 
PS - Overall the library is excellent - just these few frustrating things keep cropping up!
Back to Top
shineryu View Drop Down
Groupie
Groupie


Joined: 02 April 2006
Location: China
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote shineryu Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2008 at 11:01am
I have the same problem!
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.141 seconds.