Menu

#186 GetSelText buffer error

v1.0 (example)
closed-wont-fix
None
5
2014-03-19
2007-08-13
Anonymous
No

position
8.0 atlctrls.h
CRichEditCtrlT::GetSelText(_CSTRING_NS::CString& strText)

line 7458:LPTSTR lpstrText = strText.GetBufferSetLength(cr.cpMax - cr.cpMin);

line 7466:LPSTR lpstrText = buff.Allocate(cr.cpMax - cr.cpMin + 1);

when select east asia chars(china,jp..)
the buffer is too slow

while 7.1 no such problem?

Discussion

  • Nobody/Anonymous

    Logged In: NO

    sorry, not too slow, too small ;-)

     
  • Nenad Stefanovic

    • assigned_to: nobody --> nenadstefanovic
     
  • Nenad Stefanovic

    The code online 7466 is for RichEdit 1.0 which uses single-byte chars to get selected text. I don't think that anything can be done here. Use RichEdit 2.0 which supports multi-byte chars properly.

     
  • Nenad Stefanovic

    • status: open --> closed-wont-fix
    • Group: --> v1.0 (example)
     

Anonymous
Anonymous

Add attachments
Cancel