X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a25a27c354d8dc6a1ac18a56cc7083c5bb93242..1df4050d11b6dae91c763751c84364453427deb0:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index c4803778fe..7b7d9d905e 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -438,12 +438,16 @@ void wxTextCtrl::SetValue(const wxString& value) WriteText(value); + // mark the control as being not dirty - we changed its text, not the + // user + DiscardEdits(); + // for compatibility, don't move the cursor when doing SetValue() SetInsertionPoint(0); } } -#if wxUSE_RICHEDIT +#if wxUSE_RICHEDIT && !wxUSE_UNICODE DWORD CALLBACK wxRichEditStreamIn(DWORD dwCookie, BYTE *buf, LONG cb, LONG *pcb) { @@ -529,6 +533,7 @@ void wxTextCtrl::WriteText(const wxString& value) SetStyle(start, end, m_defaultStyle ); } +#if !wxUSE_UNICODE // next check if the text we're inserting must be shown in a non // default charset -- this only works for RichEdit > 1.0 if ( GetRichVersion() > 1 ) @@ -546,6 +551,7 @@ void wxTextCtrl::WriteText(const wxString& value) } } } +#endif // !wxUSE_UNICODE } if ( !done )