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 » docking by double clicking the title bar Collapse All
Subject Author Date
Chris Anderson Jan 18, 2008 - 11:14 AM

We have a "dockable dialog box" in our legacy app, to make it dockable with prof-ui, we created a CExtControlBar as the parent of the dialog box. It’s working fine but we noticed a bit different behavior: the user is not able to dock the "dialog box ( actually the control bar)" by double clicking the title bar any more, the only way is "drag and drop".

I didn’t find any flag or property to enable this behavior so i tried a few things to make the double clicking work. This is what I did in the experiment:
- derived a minidock frame window class from CExtMiniDockFrameWnd, and override the OnNcLButtonDblClk() function. The point is to call the MFC version of OnNcLButtonDblClk() .

class CMyDockMiniFrameWnd : public CExtMiniDockFrameWnd
{
...
afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
};

void CMyDockMiniFrameWnd ::OnNcLButtonDblClk(UINT nHitTest, CPoint point)
{
// call MFC function to enable double click
return CMiniDockFrameWnd::OnNcLButtonDblClk(nHitTest, point);
}

- derived a control bar from CExtControlBar class and override the FloatControlBar() . The point is to create a mini dock frame wnd with a different OnNcLButtonDblClk() funtion.
class CMyControlBar : public CExtControlBar
{
...
irtual void FloatControlBar(
        CPoint ptFloat,
        DWORD dwStyle = CBRS_ALIGN_TOP
        );
}

void CMyControlBar::FloatControlBar(
        CPoint ptFloat,
        DWORD dwStyle = CBRS_ALIGN_TOP
        )
{
// create CMyDockMiniFrameWnd instead of CExtMiniDockFrameWnd
}

Except the dialog box is occasionally docked above the menu bar, this seems to work fine. Is this a feasible way? Could you provide some inputs ?

thanks

Chris Anderson Jan 18, 2008 - 12:25 PM

thanks for the information. do you guys have any plan to implement this in the future ?

Technical Support Jan 18, 2008 - 11:35 AM

At the moment this feature is not supported for resizable control bars.