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 » fail to change the size of docked control bar Collapse All
Subject Author Date
Chun Pong Lau Apr 1, 2008 - 2:30 AM

Dear Support,


 


        Would you show me how to change the size of the docked control bars on the fly (when i click at a button)? I cannot do this using


SetBarSize and RecalcLayout.

 


Thanks


Chunpong


Chun Pong Lau Apr 6, 2008 - 7:38 PM

Dear Support,


 


     I have tried what you suggest but still fail to change the docked control bar size. Would you let me know how i can give you a test project?


 


Thanks


CP

Technical Support Apr 5, 2008 - 9:37 AM

There are a set of CExtControlBar::SetInitDesiredSize***() methods that allow you to specify the desired size. But please note that there is no guaranty that the size will be exactly the same as you specified when the control bar is docked together with other control bars in the same row or column. This is because in this case the control bars affect each other’s positions and sizes.

To change the size of a docked control bar, you should additionally invoke the CControlBar::CalcDynamicLayout() API and specify LM_COMMIT in its parameter. For instance, the following code specifies the height of 50 pixels for a horizontally docked control bar:

INT nDesired = 50;
pMainFrame->m_wndBarTop.SetInitDesiredSizeHorizontal( CSize( 32767, nDesired ) );
pMainFrame->m_wndBarTop.CalcDynamicLayout( nDesired, LM_HORZDOCK|LM_COMMIT );
pMainFrame->RecalcLayout();

Chun Pong Lau Apr 6, 2008 - 7:37 PM

Dear Support,


 


     I have tried it but fail to change the size of docked control bars. How can i give you a test

Chun Pong Lau Apr 6, 2008 - 7:37 PM

Dear Support,


 


     I have tried it but fail to change the size of docked

Chun Pong Lau Apr 6, 2008 - 7:37 PM

Dear Support,


 


     I have tried it but fail to change the size of

Chun Pong Lau Apr 6, 2008 - 7:37 PM

Dear Support,


 


     I have tried

Chun Pong Lau Apr 6, 2008 - 7:37 PM

Dear Support,


 


     I have