15,978
社区成员
发帖
与我相关
我的任务
分享
CEdit::GetSel
DWORD GetSel( ) const;
void GetSel( int& nStartChar, int& nEndChar ) const;
Return Value
The version that returns a DWORD returns a value that contains the starting position in the low-order word and the position of the first nonselected character after the end of the selection in the high-order word.
CEdit::SetSel
void SetSel( DWORD dwSelection, BOOL bNoScroll = FALSE );
void SetSel( int nStartChar, int nEndChar, BOOL bNoScroll = FALSE ); //第三个默认为FALSE
Example
// The pointer to my edit.
extern CEdit* pmyEdit;
// Set the selection to be all characters after the current selection.
DWORD dwSel = pmyEdit->GetSel();
pmyEdit->SetSel(HIWORD(dwSel), -1);