<div dir="ltr"><div class="gmail_extra"><br>2014-05-21 16:26 GMT+08:00 Nikolay Sivov <<a href="mailto:bunglehead@gmail.com" target="_blank">bunglehead@gmail.com</a>>:<br>><br>> But ITextSelection is a ITextRange too, so you need to implement it for ITextRange only.<br>



<br>Yes, ITextSelection interface is inherits from ITextRange. But I think functions of ITextRange</div><div class="gmail_extra">and functions of ITextSelection are independent of each other. And there are some different<br>



</div><div class="gmail_extra">between them: range of an ITextRange is given by ITextDocument::Range and immovable but</div><div class="gmail_extra">range of ITextSelection of is depend on *pCursor in ME_TextEditor.</div>


<div class="gmail_extra"><br></div>
<div class="gmail_extra">So I think implementing ITextSelection independently and just share some functions like </div><div class="gmail_extra">ME_ITextGetText between ITextRange and ITextSelection is a more convenient way.</div>










<div class="gmail_extra"><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Regards,<br></div><div>Jactry Zeng</div>
<div><br></div></div>
</div></div>