如何在文本框中光标所在的位置添加数据和将鼠标选中的部分字符用另外的字符替换掉? 如何在文本框中光标所在的位置添加数据和将鼠标选中的部分字符用另外的字符替换掉?如果是用消息传递的方法实现的请写出详细的代码.本人QQ37879915 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CharFromPosSetSelReplaceSel int start= m_remoteMsg.GetWindowTextLength(); m_remoteMsg.SetSel(start,start); m_remoteMsg.ReplaceSel(m_strSendMsg); int end=m_remoteMsg.GetWindowTextLength(); m_remoteMsg.SetSel(end,end); m_remoteMsg.SetWordCharFormat(cf); m_remoteMsg.SendMessage(EM_SCROLLCARET,0,0); m_localMsg.SetWindowText(""); 计算CString中子字符串的个数,结果不对? 这个问题到底什么时候能解决?(很多论坛上都进行啦讨论) ATL属性页里能不能加CTreeCtrl控件啊 关于对话框消息,高手请进,在线等待,急急急 最基本的``HELP 图形旋转和艺术字怎么做 如何得知用户改变了ListCtrl某列的宽度? CX0030 Error expression cannot be evaluted!!!!! 在vc6.0下无错编译的代码,怎么到了vs2008就一堆参数错误呢??? 函数返回值和内存泄露 散分。感到前途渺茫,是不是我的选择错了? 升星散分
SetSel
ReplaceSel
m_remoteMsg.SetSel(start,start);
m_remoteMsg.ReplaceSel(m_strSendMsg);
int end=m_remoteMsg.GetWindowTextLength();
m_remoteMsg.SetSel(end,end);
m_remoteMsg.SetWordCharFormat(cf);
m_remoteMsg.SendMessage(EM_SCROLLCARET,0,0);
m_localMsg.SetWindowText("");