Negates the default behavior for an edit control. The default behavior hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. If you specify ES_NOHIDESEL, the selected text is inverted, even if the control does not have the focus.
设置这个属性之后,CEdit就可以在没有拥有焦点的时候同样可以成功设置选中(直接pEdit->SetSel(1, 4);就OK),并且在失去焦点后保持选中状态。
如果没有设置这个属性,你可能是这样
pEdit->SetFocus();
pEdit->SetSel(1, 4);
做才能有选中效果,并且失去焦点后就没了。