+ // believe it or not, but EM_GETTEXTRANGE uses just CR ('\r') for
+ // the newlines which is neither Unix nor Windows style (Win95 with
+ // riched20.dll shows this behaviour) - convert it to something
+ // reasonable
+ for ( ; *p; p++ )
+ {
+ if ( *p == _T('\r') )
+ *p = _T('\n');
+ }
+
+ str.UngetWriteBuf();
+ }
+ //else: no text at all, leave the string empty