CEdit::GetFirstVisibleLine
更新 : 2007 年 11 月
エディット コントロールの 1 番上の可視の行を調べます。
int GetFirstVisibleLine( ) const;
戻り値
1 番上の可視の行の 0 からのインデックスを返します。単一行のエディット コントロールの場合は 0 を返します。
解説
詳細については、Windows SDK の「EM_GETFIRSTVISIBLELINE」を参照してください。
使用例
int nFirstVisible = m_myEdit.GetFirstVisibleLine();
// Scroll the edit control so that the first visible line
// is the first line of text.
if (nFirstVisible > 0)
{
m_myEdit.LineScroll(-nFirstVisible, 0);
}
必要条件
ヘッダー : afxwin.h