CStatusBarCtrl::GetParts

Retrieves a count of the parts in a status bar control.

int GetParts(
   int nParts,
   int* pParts 
) const;

Parameters

  • nParts
    Number of parts for which to retrieve coordinates. If this parameter is greater than the number of parts in the control, the message retrieves coordinates for existing parts only.

  • pParts
    Address of an integer array having the same number of elements as the number of parts specified by nParts. Each element in the array receives the client coordinate of the right edge of the corresponding part. If an element is set to – 1, the position of the right edge for that part extends to the right edge of the status bar.

Return Value

The number of parts in the control if successful, or zero otherwise.

Remarks

This member function also retrieves the coordinate of the right edge of the given number of parts.

Example

int pParts[2];

int nParts = m_wndSBC.GetParts(2, pParts);   

Requirements

Header: afxcmn.h

See Also

Concepts

CStatusBarCtrl Class

CStatusBarCtrl Members

Hierarchy Chart

CStatusBarCtrl::GetBorders

CStatusBarCtrl::SetParts