组建对象ITextSelection如何插入一行
并对该行付上固定文字下面代码
//lTopLine 为选中的第一行的行号
//lBottomLine 为选中的最后一行的行号
难点如何在lTopLine行前插入一行特定数据的文本for(long iCount=lTopLine;iCount<=lBottomLine;iCount++)
{
// TextSelect->NewLine; ???
TextSelect->MoveTo(iCount,1,v);
TextSelect->get_Text(&tmpBSTR);
tmpStr=tmpBSTR;
tmpStr=_T("//")+tmpStr;
if(iCount==lTopLine)
{
TextSelect->MoveTo(iCount,1,v);
TextSelect->put_Text(tmpStr.AllocSysString());
TextSelect->MoveTo(iCount,0,v);
tmpStr=tmpStr+_T("Modified By vabug ")+strDate+_T("  Begin");
}
if(iCount==lBottomLine)
{
TextSelect->MoveTo(iCount,1,v);
TextSelect->put_Text(tmpStr.AllocSysString());
TextSelect->MoveTo(iCount,0,v);
tmpStr=tmpStr+_T("Modified By vabug ")+strDate+_T("  End");
}
TextSelect->put_Text(tmpStr.AllocSysString());
}