Professional UI Solutions
Site Map   /  Register


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 General Discussion » Toolbar Docking Problem Collapse All
Subject Author Date
Matteo Codda Sep 8, 2008 - 8:41 AM


First of all, thanks for everything...

When a toolbar is created at runtime, I set also the position using MoveWindow or the "CircleNo" parameter.

After creation I can see every toolbars in the right site ! But if I minimize the main window, and after I restore the main window, every bars are positioned in a singol row and alligned to the left !!!

If I re-change manually the site of bars with the mouse and I redo "minimize/restore" everything it’s ok, the bars are remained in the correct position!!!

Thank you,



Technical Support Sep 10, 2008 - 6:36 AM

It’s not correct and even not possible to set the position of either MFC or Prof-UIS control bars using MoveWindow() API. In the case of toolbars, you should use the CFrameWnd::DockControlBar()() API, which allows you to specify the target control bar’s location. Please take a look at the ProfStudio sample which docks many toolbars in many rows/columns relative to each other near each side of the main frame window. The general rule is simple: dock some toolbar using CFrameWnd::DockControlBar()() API, recompute the frame window layout, get and modify the window rectangle of the docked toolbar, use the modified rectangle for docking other toolbar relative to the previous one using the CFrameWnd::DockControlBar()() API.