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 » resize CExtControlBar programmatically Collapse All
Subject Author Date
Matthew Claus Nov 20, 2006 - 2:35 PM

Hi!

I am confused about how to resize a CExtControlBar object programmatically. Did try the trick from your source code:
---------------------------------------------------------------------------------------------------------
pDockFrame->SendMessage( CExtPopupMenuWnd::g_nMsgCustomFloatPos,
                                    WPARAM(pDockFrame->m_hWnd),
                                    LPARAM(&rcCustomFloatPos) );

pDockFrame->SetWindowPos( pWndAfter, posX, posY, lengthX, lengthY, SWP_NOMOVE );
---------------------------------------------------------------------------------------------------------
but it failed. Is it because of I did something else wrong or the approach is not good? What is the proper way to do that?

George Seryakov (gseryakov@espeed.com), in behalf of Matt Claus

Matthew Claus Nov 22, 2006 - 8:44 AM

Works great!
It is a little confusing that the position is being set for the frame window and the size - for the CExtControlBar.

Technical Support Nov 23, 2006 - 9:39 AM

The dockable control bars in MFC are designed to work with the frame window (which is called "dock site"). That is why you should always use the API specific for control bars instead of the standard window management API.

Technical Support Nov 21, 2006 - 11:19 AM

Please download the following sample, which shows how to resize control bars programmatically:

ChangeFloatingSize.zip