http://bugs.winehq.org/show_bug.cgi?id=14280
Summary: Richedit's EM_SETTEXTEX ignores ST_SELECTION Product: Wine Version: 1.1.0 Platform: Other OS/Version: other Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: richedit AssignedTo: wine-bugs@winehq.org ReportedBy: ne4@parsoma.net
EM_SETTEXTEX which supposedly obeys ST_SELECTION (see http://msdn.microsoft.com/en-us/library/bb787954(VS.85).aspx ) but the EM_SETTEXTEX handler ignores it, calling "ME_StreamInRTFString(editor, 0, (char *)lParam);" either way, which via ME_StreamInRTFString causes ME_StreamIn to delete the entire buffer and not just just that one selection.
I have checked that Windows XP does obey the ST_SELECTION flag as documented by MSDN.
I suspect one fix is on the 1.1.0 version of http://source.winehq.org/source/dlls/riched20/editor.c#L2184 , which should probably set the second parameter of ME_StreamInRTFString to a true value.