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 » Redraw/Resize problem with floating CExtToolControlBar Collapse All
Subject Author Date
Gregor Jasny Aug 18, 2007 - 10:14 AM


I need to add/remove buttons to a floating CExtToolControlBar.
After calling InsertButton or remove button I try to notify the toolbar
that its layout changed:

CFrameWnd *pParent = GetParentFrame();
if (pParent)

But the upper part (which contains the title and the small ’x’) stays at the old size until I move the mouse somewhere over the toolbar.

In another docked toolbar I change the button text from time to time. But RecalcLayout does not work there, too. So the text ’runs’ into the next toolbar button.

What do I miss here?


Technical Support Aug 19, 2007 - 9:59 AM

In some cases the non-client area of floating mini frame window should be re-painted manually. You should invoke the following code:

CFrameWnd * pFrame = GetParentFrame();
      if( pFrame != NULL )
            ASSERT_VALID( pFrame );
            if( pFrame->IsKindOf( RUNTIME_CLASS( CMiniFrameWnd ) ) )
                  pFrame->SendMessage( WM_NCPAINT );