CStatusBarCtrl::GetText
Recupera el texto de la parte determinada de un control de barra de estado.
CString GetText(
int nPane,
int* pType = NULL
) const;
int GetText(
LPCTSTR lpszText,
int nPane,
int* pType = NULL
) const;
Parámetros
lpszText
Dirección del búfer que recibe el texto.Este parámetro es una cadena terminada en null.nPane
índice basado en cero de la parte de la que recuperar el texto.pType
Puntero a un entero que recibe información de tipo.el tipo puede ser uno de estos valores:El texto de0 The se dibuja con un borde para producirse más bajo que el plano de la barra de estado.
El texto deSBT_NOBORDERS The se dibuja sin límites.
El texto deSBT_POPOUT The se dibuja con un borde aparezca posterior al plano de la barra de estado.
SBT_OWNERDRAW si el texto tiene el tipo de gráfico de SBT_OWNERDRAW , pType recibe este mensaje y devuelve el valor de 32 bits asociado al texto en lugar de la longitud y el tipo de la operación.
Valor devuelto
Longitud, en caracteres, de texto o de CString que contiene el texto actual.
Ejemplo
int nType;
TCHAR* pszPaneOneText;
pszPaneOneText = new TCHAR[ m_wndSBC.GetTextLength(1, &nType) + 1 ];
int nTextLength = m_wndSBC.GetText(pszPaneOneText, 1, &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;
}
delete pszPaneOneText;
Requisitos
encabezado: afxcmn.h