git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49783
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// wxIEnumString implements IEnumString interface
// ----------------------------------------------------------------------------
// wxIEnumString implements IEnumString interface
// ----------------------------------------------------------------------------
+// standard VC6 SDK (WINVER == 0x0400) does not know about IAutoComplete
+#if wxUSE_OLE && (WINVER >= 0x0500)
+ #define HAS_AUTOCOMPLETE
+#endif
+
+#ifdef HAS_AUTOCOMPLETE
#include "wx/msw/ole/oleutils.h"
#include <shldisp.h>
#include "wx/msw/ole/oleutils.h"
#include <shldisp.h>
IMPLEMENT_IUNKNOWN_METHODS(wxIEnumString)
IMPLEMENT_IUNKNOWN_METHODS(wxIEnumString)
+#endif // HAS_AUTOCOMPLETE
// ============================================================================
// wxTextEntry implementation
// ============================================================================
// wxTextEntry implementation
// auto-completion
// ----------------------------------------------------------------------------
// auto-completion
// ----------------------------------------------------------------------------
bool wxTextEntry::AutoCompleteFileNames()
{
bool wxTextEntry::AutoCompleteFileNames()
{
typedef HRESULT (WINAPI *SHAutoComplete_t)(HWND, DWORD);
static SHAutoComplete_t s_pfnSHAutoComplete = (SHAutoComplete_t)-1;
static wxDynamicLibrary s_dllShlwapi;
typedef HRESULT (WINAPI *SHAutoComplete_t)(HWND, DWORD);
static SHAutoComplete_t s_pfnSHAutoComplete = (SHAutoComplete_t)-1;
static wxDynamicLibrary s_dllShlwapi;
+#else // !HAS_AUTOCOMPLETE
+ return false;
+#endif // HAS_AUTOCOMPLETE/!HAS_AUTOCOMPLETE
}
bool wxTextEntry::AutoComplete(const wxArrayString& choices)
{
}
bool wxTextEntry::AutoComplete(const wxArrayString& choices)
{
// create an object exposing IAutoComplete interface (don't go for
// IAutoComplete2 immediately as, presumably, it might be not available on
// older systems as otherwise why do we have both -- although in practice I
// create an object exposing IAutoComplete interface (don't go for
// IAutoComplete2 immediately as, presumably, it might be not available on
// older systems as otherwise why do we have both -- although in practice I
// do it immediately, presumably the edit control itself keeps a reference
// to the auto completer object
pAutoComplete->Release();
// do it immediately, presumably the edit control itself keeps a reference
// to the auto completer object
pAutoComplete->Release();
+#else // !HAS_AUTOCOMPLETE
+ return false;
+#endif // HAS_AUTOCOMPLETE/!HAS_AUTOCOMPLETE
// ----------------------------------------------------------------------------
// editable state
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// editable state
// ----------------------------------------------------------------------------