X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03dede4dc15796ab5e3e49ef597ebbc461227bca..43f4e852a1b2ac37c3db6a2b87315192ac549191:/src/msw/textentry.cpp diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index e993654d24..a91e8f33ca 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -625,7 +625,7 @@ wxTextEntry::~wxTextEntry() void wxTextEntry::WriteText(const wxString& text) { - ::SendMessage(GetEditHwnd(), EM_REPLACESEL, 0, (LPARAM)text.wx_str()); + ::SendMessage(GetEditHwnd(), EM_REPLACESEL, 0, wxMSW_CONV_LPARAM(text)); } wxString wxTextEntry::DoGetValue() const @@ -744,6 +744,8 @@ void wxTextEntry::GetSelection(long *from, long *to) const #ifdef HAS_AUTOCOMPLETE +#if wxUSE_DYNLIB_CLASS + bool wxTextEntry::DoAutoCompleteFileNames(int flags) { typedef HRESULT (WINAPI *SHAutoComplete_t)(HWND, DWORD); @@ -791,6 +793,8 @@ bool wxTextEntry::DoAutoCompleteFileNames(int flags) return true; } +#endif // wxUSE_DYNLIB_CLASS + wxTextAutoCompleteData *wxTextEntry::GetOrCreateCompleter() { if ( !m_autoCompleteData ) @@ -952,9 +956,12 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins) if ( margins.x != -1 ) { - // left margin + // Set both horizontal margins to the given value, we don't distinguish + // between left and right margin at wx API level and it seems to be + // better to change both of them than only left one. ::SendMessage(GetEditHwnd(), EM_SETMARGINS, - EC_LEFTMARGIN, MAKELONG(margins.x, 0)); + EC_LEFTMARGIN | EC_RIGHTMARGIN, + MAKELONG(margins.x, margins.x)); } if ( margins.y != -1 )