|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
The framework calls this member function to calculate the dimensions of a dynamic toolbar.
The requested dimension of the control bar, either horizontal or vertical, depending on dwMode.
The following predefined flags are used to determine the height and width of the dynamic control bar. Use the bitwise-OR (|) operator to combine the flags.
Layout mode flags What it means
Indicates whether the control bar should be stretched to the size of the frame. Set if the bar is not a docking bar (not available for docking). Not set when the bar is docked or floating (available for docking). If set, LM_STRETCH ignores nLength and returns dimensions based on the LM_HORZ state. LM_STRETCH works similarly to the bStretch parameter used in CalcFixedLayout; see that member function for more information about the relationship between stretching and orientation.
Indicates that the bar is horizontally or vertically oriented. Set if the bar is horizontally oriented, and if it is vertically oriented, it is not set. LM_HORZ works similarly to the bHorz parameter used in CalcFixedLayout; see that member function for more information about the relationship between stretching and orientation.
Most Recently Used Dynamic Width. Ignores nLength parameter and uses the remembered most recently used width.
Horizontal Docked Dimensions. Ignores nLength parameter and returns the dynamic size with the largest width.
Vertical Docked Dimensions. Ignores nLength parameter and returns the dynamic size with the largest height.
Set if nLength indicates height (Y-direction) instead of width.
Resets LM_MRUWIDTH to current width of floating control bar.
Override this member function to provide your own dynamic layout in classes you derive from CControlBar. MFC classes derived from CControlBar, such as CToolbar, override this member function and provide their own implementation.