CStatusBarCtrl::GetTextLength

更新 : 2007 年 11 月

ステータス バー コントロールの指定区画からテキストの長さを文字数で取得します。

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

パラメータ

  • nPane
    テキストを取得する区画の 0 から始まるインデックス。

  • pType
    型情報を受け取る整数へのポインタ。型は次の値のいずれかです。

    • 0   テキストは、ステータス バーの面よりもくぼんだ境界線と共に描画されます。

    • SBT_NOBORDERS   テキストは境界線なしで描画されます。

    • SBT_OWNERDRAW    テキストは親ウィンドウが描画します。

    • SBT_POPOUT   テキストは、ステータス バーの面よりも浮き出した境界線と共に描画されます。

戻り値

テキストの長さを文字数で返します。

使用例

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;
}   

必要条件

ヘッダー : afxcmn.h

参照

参照

CStatusBarCtrl クラス

階層図

CStatusBarCtrl::GetText

CStatusBarCtrl::SetText

その他の技術情報

CStatusBarCtrl のメンバ