git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23734
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( to == -1 )
to = len;
if ( to == -1 )
to = len;
// we must use EM_STREAMOUT if we don't want to lose all characters
// not representable in the current character set (EM_GETTEXTRANGE
// simply replaces them with question marks...)
// we must use EM_STREAMOUT if we don't want to lose all characters
// not representable in the current character set (EM_GETTEXTRANGE
// simply replaces them with question marks...)
// StreamOut() wasn't used or failed, try to do it in normal way
if ( str.empty() )
// StreamOut() wasn't used or failed, try to do it in normal way
if ( str.empty() )
+#endif // !wxUSE_UNICODE
{
// alloc one extra WORD as needed by the control
wxStringBuffer tmp(str, ++len);
{
// alloc one extra WORD as needed by the control
wxStringBuffer tmp(str, ++len);
TEXTRANGE textRange;
textRange.chrg.cpMin = from;
TEXTRANGE textRange;
textRange.chrg.cpMin = from;
- textRange.chrg.cpMax = to == -1 ? len : to;
+ textRange.chrg.cpMax = to;
textRange.lpstrText = p;
(void)SendMessage(GetHwnd(), EM_GETTEXTRANGE,
textRange.lpstrText = p;
(void)SendMessage(GetHwnd(), EM_GETTEXTRANGE,