Поделиться через


CControlBar::CalcFixedLayout

Call this member function to calculate the horizontal size of a control bar.

virtual CSize CalcFixedLayout(
   BOOL bStretch,
   BOOL bHorz 
);

Параметры

  • bStretch
    Indicates whether the bar should be stretched to the size of the frame. The bStretch parameter is nonzero when the bar is not a docking bar (not available for docking) and is 0 when it is docked or floating (available for docking).

  • bHorz
    Indicates that the bar is horizontally or vertically oriented. The bHorz parameter is nonzero if the bar is horizontally oriented and is 0 if it is vertically oriented.

Возвращаемое значение

The control bar size, in pixels, of a CSize object.

Заметки

Control bars such as toolbars can stretch horizontally or vertically to accommodate the buttons contained in the control bar.

If bStretch is TRUE, stretch the dimension along the orientation provided by bHorz. In other words, if bHorz is FALSE, the control bar is stretched vertically. If bStretch is FALSE, no stretch occurs. The following table shows the possible permutations, and resulting control-bar styles, of bStretch and bHorz.

bStretch

bHorz

Stretching

Orientation

Docking/Not docking

TRUE

TRUE

Horizontal stretching

Horizontally oriented

Not docking

TRUE

FALSE

Vertical stretching

Vertically oriented

Not docking

FALSE

TRUE

No stretching available

Horizontally oriented

Docking

FALSE

FALSE

No stretching available

Vertically oriented

Docking

Требования

Header: afxext.h

См. также

Основные понятия

CControlBar Class

CControlBar Members

Hierarchy Chart

CControlBar::CalcDynamicLayout