<div class="gmail_quote">On Mon, Feb 16, 2009 at 3:19 PM, James McKenzie <span dir="ltr">&lt;<a href="mailto:jjmckenzie51@earthlink.net">jjmckenzie51@earthlink.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">
</div>Would this be needed for EM_FORMATRANGE support or can this safely be<br>
removed. &nbsp;Don&#39;t want to delete and then add back code.<br>
</blockquote><div><br><br>This wouldn&#39;t be needed for EM_FORMATRANGE.&nbsp; If it were to duplicate
the text to cache the formatting it could also use ME_TextBuffer,
however the previous patch sent for EM_FORMATRANGE didn&#39;t even use
that, it just duplicated a the text and stored the pointer to the
linked list for the text as local variables and destroyed them before
returning from ME_FormatRange.<br>
<br>
The easier way to handle this message would probably be to rewrap the
text, for the specified target device, and then rewrap it again to
restore the text before returning from ME_FormatRange.&nbsp; This would then
allow ME_SETTARGETDEVICE to be implemented properly, and wouldn&#39;t be as
bad as duplicating all the text and destoying it while processing each
EM_FORMATRANGE message.<br><br>The wrapping code needs to be looked at first though, because currently it is slow since it joins and splits runs each time it rewraps the text.<br></div></div>