GetSelText buffer error
Brought to you by:
nenadstefanovic
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?
Anonymous
Logged In: NO
sorry, not too slow, too small ;-)
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.