X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2fc2bd51c2351f3cb7e289bb397efbb60b8cbc5..dff750b48ff5da70dfce215b3a6546cba8bac2e6:/src/msw/textentry.cpp diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index b763b5de8e..f8b91e383c 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -103,7 +103,7 @@ public: memcpy(olestr, wcbuf, size); - *rgelt++ = wx_static_cast(LPOLESTR, olestr); + *rgelt++ = static_cast(olestr); ++(*pceltFetched); } @@ -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 @@ -335,7 +341,7 @@ bool wxTextEntry::AutoComplete(const wxArrayString& choices) NULL, CLSCTX_INPROC_SERVER, IID_IAutoComplete, - wx_reinterpret_cast(void **, &pAutoComplete) + reinterpret_cast(&pAutoComplete) ); if ( FAILED(hr) ) { @@ -359,7 +365,7 @@ bool wxTextEntry::AutoComplete(const wxArrayString& choices) hr = pAutoComplete->QueryInterface ( IID_IAutoComplete2, - wx_reinterpret_cast(void **, &pAutoComplete2) + reinterpret_cast(&pAutoComplete2) ); if ( SUCCEEDED(hr) ) { @@ -378,6 +384,7 @@ bool wxTextEntry::AutoComplete(const wxArrayString& choices) return false; #endif // HAS_AUTOCOMPLETE/!HAS_AUTOCOMPLETE } +#endif // wxUSE_OLE // ---------------------------------------------------------------------------- // editable state