X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/867b485eb61b88d2d6a368ad57b055804d6cdfda..c3e57ac4ac9222d84ac208a493b57fb24e474a6a:/src/msw/textentry.cpp diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index 346791506e..9c5a0fc93e 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -243,6 +243,11 @@ bool wxTextEntry::CanRedo() const void wxTextEntry::SetInsertionPoint(long pos) { + // calling DoSetSelection(-1, -1) would select everything which is not what + // we want here + if ( pos == -1 ) + pos = GetLastPosition(); + // be careful to call DoSetSelection() which is overridden in wxTextCtrl // and not just SetSelection() here DoSetSelection(pos, pos); @@ -287,6 +292,7 @@ void wxTextEntry::GetSelection(long *from, long *to) const // auto-completion // ---------------------------------------------------------------------------- +#if wxUSE_OLE bool wxTextEntry::AutoCompleteFileNames() { #ifdef HAS_AUTOCOMPLETE @@ -295,9 +301,7 @@ bool wxTextEntry::AutoCompleteFileNames() static wxDynamicLibrary s_dllShlwapi; if ( s_pfnSHAutoComplete == (SHAutoComplete_t)-1 ) { - wxLogNull noLog; - - if ( !s_dllShlwapi.Load(_T("shlwapi.dll"), wxDL_VERBATIM) ) + if ( !s_dllShlwapi.Load(_T("shlwapi.dll"), wxDL_VERBATIM | wxDL_QUIET) ) { s_pfnSHAutoComplete = NULL; } @@ -380,6 +384,7 @@ bool wxTextEntry::AutoComplete(const wxArrayString& choices) return false; #endif // HAS_AUTOCOMPLETE/!HAS_AUTOCOMPLETE } +#endif // wxUSE_OLE // ---------------------------------------------------------------------------- // editable state