CEdit中(多行属性),双击选中一行文本

// 重写CEdit类,处理WM_LBUTTONDBLCLK消息 void CNewEdit::OnLButtonDblClk(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CEdit::OnLButtonDblClk(nFlags, point); int start = LineIndex(HIWORD(CharFromPos(point))); int end = -1; if(-1 != start) { end = start + LineLength(start); SetSel(start, end); } }

你可能感兴趣的:(CEdit中(多行属性),双击选中一行文本)