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 » Docked CExtControlBar without caption but with border Collapse All
Subject Author Date
Thomas Zaenker Feb 28, 2005 - 10:53 AM

Dear support team,


the additional buttons in TabMdiWnd work fine. Thanks again. And now to my next problems.


To save some screen space I would like to remove the caption of a docked CExtControlBar. For the floating state it’s ok. By removing the flag CBRS_GRIPPER I can achieve this but only after removing the saved registry settings. Is this a bug or by intension?


The second drawback is that there is no border at all. Is it possible to have some kind of 3D border like the CExtToolControlBar around a docked Controlbar. The WS_BORDER or WS_THICKFRAME styles don’t work.


And last but not least would redocking be possible by grabbing that border - because the whole client will be filled out by a child?



Best regards.


Axel

Thomas Zaenker Mar 1, 2005 - 3:46 AM

Dear support team,


I think with the help of your template CExtWRB I can solve the problem with the border. The problem with toggling CBRS_GRIPPER is of course still valid.


Best regards.


 


Axel


 

Technical Support Mar 1, 2005 - 5:07 AM

You can surely use the CExtWRB template class to add a style border to the window that is inside CExtControlBar. But we recommend you to use this template only for windows which never have scrollbars (usually, for resizable dialogs). You may use CProfStudioThinFrame class of the <span class = newgreen>ProfStudio</code> sample application for any scrollable window like a tree view or a list box.

Technical Support Mar 1, 2005 - 4:22 AM

Yes, you can hide the caption of resizable control bars by removing the CBRS_GRIPPER style. Of course, you need to remove the registry data that describe the saved state of the control bar and frame window because styles of resizable control bars are stored there.

It is possible to implement any border for the resizable control bar by handling WM_NCCALCSIZE and WM_NCPAINT messages. Please give us more details on which border you need exactly. It would also be nice to take a look at it in any existing application.

Yes, you could implement grabbing the border with the left mouse button and dragging the control bar but, then, the question arises: How will you resize the control bar? Besides, your control bar has a caption when it is docked inside a tab group. Do you think it’s user-friendly to remove the caption?

Ok, if you want to drag-and-drop a control bar by grabbing its border, just use you own CExtControlBar-derived class and handle the WM_NCLBUTTONDOWN windows message like as follows:

void CExtControlBar::OnNcLButtonDown( ...
{
CPoint point;
    if( ! ::GetCursorPos(&point) )
        return;
CPoint ptOffset( point );
CRect rcWnd;
    GetWindowRect( &rcWnd );
    ptOffset -= rcWnd.TopLeft();
    _DraggingStart( point, ptOffset );
}