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 » Bug with docking going into "maximized" mode... Collapse All
Subject Author Date
Kevin Murray Mar 4, 2009 - 12:59 PM

I have two docked windows.  Programmatically I have computed the sizes I want for them, and have set the size for both CExtDynamicControlBars via SetInitDesiredSizeVertical. I then dock each bar using:




virtual bool DockControlBar(

UINT nDockBarID,

UINT nCircleNo,

CFrameWnd * pDockSite = NULL, // can be NULL only if bar already was at once docked

bool bRecalcLayout = true

);


This appears to work fine, docking both to the left in cirlce 1, resulting in something like this:




|-------------------|

| Window One |

|-------------------|

| |

| |

| |

|-------------------|

| Window Two |

|-------------------|

| |

| |

| |

|-------------------|


However, if I minimize the app, then restore it, the docked windows rearrange themselves to this:




|-------------------|

| Window One |

|-------------------|

| Window Two |

|-------------------|

| |

| |

| |

| |

| |

| |

| |

|-------------------|


How do I prevent this behavior from occurring?


</p>

Kevin Murray, AGI

Technical Support Mar 9, 2009 - 10:35 AM

We suspect you simply forgot to invoke the main frame’s RecalcLayout() method after docking each bar.

Kevin Murray Mar 5, 2009 - 11:21 AM

I tried both of those methods. 


DockControlBarInnerOuter won’t let me dock in the same place as an already docked window.


DockControlBarLTRB will let me dock in the same space, but only works well with two windows.  If I have three windows, for example, I cannot seem to get them to space evenly.  For example:


pBar1->DockControlBarInnerOuter(...);

pBar2->DockControlBarLTRB( 33, pBar1 );

pBar3->DockControlBarLTRB( ..., pBar1 ); // <-- regardless of percentage, always docks the same way


How do I properly dock x bars to the same side evenly using DockControlBarLTRB?


Kevin Murray



Technical Support Mar 5, 2009 - 8:01 AM

You should not use the CExtControlBar::DockControlBar() method. It’s present just for compatibility with very old Prof-UIS versions. Please use the CExtControlBar::DockControlBarInnerOuter() and CExtControlBar::DockControlBarLTRB() overloaded methods instead. There is the overloaded version of the CExtControlBar::DockControlBarLTRB() method which allows you dock one control bar into the same place with other and specify side and percent of space to occupy.