Did you read the documentation for CEdit::SetlSel? What does the last argument do?