POINT pos = GetCaretPos();//获取光标相对于控件的位置
int caretpos = ((CEdit*)GetDlgItem(IDC_EDIT1))->CharFromPos(pos);//获取光标位置
Return Value
The character index in the low-order WORD, and the line index in the high-order WORD
pt
The coordinates of a point in the client area of this CEdit object.
void CMyCtrlForm::MouseWheelAdd(short zDelta, int editboxID)
{
// TODO: 在此添加消息处理程序代码和/或调用默认
CString str, strfirst, strsecond, strthird;
bool bflag = false;
int nfirst = 0, nsecond = 0, nthird = 0;
int nLengthOfFirst = 0, nLengthOfsecond = 0, nLengthOfThird = 0;
GetDlgItemText(editboxID, str);
POINT pos = GetCaretPos();//获取光标相对于控件的位置
int caretpos = ((CEdit*)GetDlgItem(editboxID))->CharFromPos(pos);//获取光标位置
int pointpos = str.Find(".");
if (caretpos == 0)
return;
if (pointpo