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


CStatusBarCtrl::SetParts

Sets the number of parts in a status bar control and the coordinate of the right edge of each part.

BOOL SetParts(
   int nParts,
   int* pWidths 
);

Параметры

  • nParts
    Number of parts to set. The number of parts cannot be greater than 255.

  • pWidths
    Address of an integer array having the same number of elements as parts specified by nParts. Each element in the array specifies the position, in client coordinates, of the right edge of the corresponding part. If an element is – 1, the position of the right edge for that part extends to the right edge of the control.

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

Nonzero if successful; otherwise zero.

Пример

const int c_nParts = 4;
CRect rect;

m_wndSBC.GetClientRect(&rect);
int aWidths[c_nParts] = { rect.right-300, rect.right-200, rect.right-100, 
   -1 };

VERIFY(m_wndSBC.SetParts(c_nParts, aWidths));

Требования

Header: afxcmn.h

См. также

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

CStatusBarCtrl Class

CStatusBarCtrl Members

Hierarchy Chart

CStatusBarCtrl::GetBorders

CStatusBarCtrl::GetParts