CEdit::GetSel

调用此函数获取当前选择的开始和结束字符位置(如果有)使用的返回值或参数,在编辑控件。

DWORD GetSel( ) const; 
void GetSel( 
   int& nStartChar, 
   int& nEndChar  
) const;

参数

  • nStartChar
    对一个将接收第一个字符位置在当前选择的整数。

  • nEndChar
    对一个将接收第一nonselected字符位置。当前选择的末尾的整数。

返回值

返回 DWORD 的版本返回该选择之后的末尾包含在低序运行的起始位置和第一nonselected字符位置。高位符号值。

备注

有关更多信息,请参见 Windows SDK的 EM_GETSEL

示例

// Set the selection to be all characters after the current selection.
DWORD dwSel = m_myEdit.GetSel();
m_myEdit.SetSel(HIWORD(dwSel), -1);

要求

Header: afxwin.h

请参见

参考

CEdit Class

层次结构图

CEdit::SetSel