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


CStatusBarCtrl::GetTextLength

Retrieves the length, in characters, of the text from the given part of a status bar control.

int GetTextLength(
   int nPane,
   int* pType = NULL
) const;

Параметры

  • nPane
    Zero-based index of the part from which to retrieve text.

  • pType
    Pointer to an integer that receives the type information. The type can be one of these values:

    • 0   The text is drawn with a border to appear lower than the plane of the status bar.

    • SBT_NOBORDERS   The text is drawn without borders.

    • SBT_OWNERDRAW   The text is drawn by the parent window.

    • SBT_POPOUT   The text is drawn with a border to appear higher than the plane of the status bar.

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

The length, in characters, of the text.

Пример

int nType;
int nLength = m_wndSBC.GetTextLength(0, &nType);

switch( nType )
{
   case 0:
      // Text is drawn with a border to appear lower than the 
      // plane of the status bar
      break;
   case SBT_NOBORDERS:
      // text is drawn without borders
      break;
   case SBT_OWNERDRAW:
      // Text is drawn by the parent window
      break;
   case SBT_POPOUT:
      // Text is drawn with a border to appear higher than the 
      // plane of the status bar
      break;
}   

Требования

Header: afxcmn.h

См. также

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

CStatusBarCtrl Class

CStatusBarCtrl Members

Hierarchy Chart

CStatusBarCtrl::GetText

CStatusBarCtrl::SetText