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.
Subject |
Author |
Date |
|
Raffaele Cappelli
|
Mar 8, 2006 - 1:48 AM
|
Hello,
is there an easy way to programmatically set the width of a floating CExtToolControlBar, so that it automatically wraps and chooses an appropriate height to fit the new width? I was able to do that with normal mfc toolbars playing with the m_nMRUWidth member, but the same approach does not seem to work with CExtToolControlBar. It is not necessary that the toolbar accepts exactly the width set from the program, but it should be resized to be close to it. Please let me know your advices, thank you.
|
|
Technical Support
|
Mar 9, 2006 - 9:31 AM
|
Here is the solution which you can test with the m_wndToolBarStandard toolbar in the DRAWCLI sample. Just put the following code at the end of the CMainFrame::OnCreate() method and play with the first parameter of the CalcDynamicLayout() method: m_wndToolBarStandard.FloatControlBar(CPoint(400,400));
m_wndToolBarStandard.CalcDynamicLayout(
200,
LM_HORZ|LM_COMMIT
);
m_wndToolBarStandard.GetParentFrame()->RecalcLayout();
|
|
Raffaele Cappelli
|
Mar 9, 2006 - 2:04 PM
|
|
|