Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Need to autoresize a dockbar and its content Collapse All
Subject Author Date
Eric guez Feb 24, 2010 - 3:22 AM

Hi !


I want to resize a dockbar (if fact AFX_IDW_DOCKBAR_BOTTOM) and its content ( some CExtControlBar).
I know its supposed to be an user interaction, but I need to do it programaticaly to fit some content.


Is there a way to do that ?

Thanks!

Eric guez Feb 27, 2010 - 2:06 AM

Ok, I did a picture :

http://filedepot.free.fr//public/a21a73c727ccb47361c909d3eb4b8732.php

I want to resize the purple part :)

Technical Support Mar 1, 2010 - 4:26 AM

Here is the test project demonstrating how to change the size of floating or docked bars:

http://www.prof-uis.com/download/forums/ChangeFloatingSize3.zip

Your bars are docked in a horizontal row. To change their size, you should invoke the CExtControlBar::SetInitDesizredSizeHorizontal() method and then recompute the layout of parent frame window.

Eric guez Mar 11, 2010 - 6:52 AM

Thanks, I’ll try this.

But how can I recompute the layout of parent frame window ?

Eric guez Mar 11, 2010 - 9:35 AM

Everything works !
Thank you

Technical Support Feb 25, 2010 - 1:19 PM

If you have several CExtControlBar resizable control bars docked into one vertical column, then they have the same CExtDockBar parent dock bar window. The layout of all the control bars in these columns is managed by Prof-UIS automatically and the control bars are always occupy the entire column height. If you undock all the control bars from these column, then Prof-UIS will destroy the CExtDockBar window because the dock bars used by Prof-UIS resizable control bars are the dynamically allocated dock bar windows. The same is true for horizontal rows with resizable control bars. Please explain us how your resizable control bars does not fit the area of their parent dock bars and how would you like to animate them? May be, you know some other application where you saw what you asking about?

Eric guez Feb 25, 2010 - 2:37 AM

Basicaly , I have 2 CExtControlBar in a dockbar. I want to change (or maybe animate) this dockbar to fit the content of the framewnd.

I know this approach (dock & control bar) is not is not the best one, but I can not rewrite this existing code.

Technical Support Feb 24, 2010 - 1:02 PM

The dock bars (CDockBar in MFC, CExtDockBar in Prof-UIS) are internal MFC components. There are 4 dock bars inside the CFrameWnd window. One dock bar for each side of its parent frame window. The dock bar windows are just containers for re-dockable toolbars in the docked state. The dock bar windows are always automatically resized to occupy all the available width/height. We have no idea how they can be resized in some special way and why they should behave not by default. Please explain us what you are going to code?
Additionally, please take a look at the FixedSizePanels sample application. It contains several control bars with non-default behavior and, may be, you will find what you need.