]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxUSE_ACTIVEX which depends on wxUSE_VARIANT and which wxUSE_MEDIACTRL depends...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Oct 2006 22:37:07 +0000 (22:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Oct 2006 22:37:07 +0000 (22:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/chkconf.h
include/wx/msw/ole/activex.h
include/wx/msw/setup0.h
setup.h.in
src/msw/ole/activex.cpp

index 058db00c70ba24d7589afa16a39cf08160cd79a0..3dfde0d6dd59efa63f2289d7115c9440664c3469 100644 (file)
 #   define wxUSE_DATEPICKCTRL_GENERIC 1
 #endif
 
+
+/* check that MSW-specific options are defined too */
+#ifndef wxUSE_ACTIVEX
+#    ifdef wxABORT_ON_CONFIG_ERROR
+#        error "wxUSE_ACTIVEX must be defined."
+#    else
+#        define wxUSE_ACTIVEX 0
+#    endif
+#endif /* !defined(wxUSE_ACTIVEX) */
+
+#ifndef wxUSE_DIALUP_MANAGER
+#    ifdef wxABORT_ON_CONFIG_ERROR
+#        error "wxUSE_DIALUP_MANAGER must be defined."
+#    else
+#        define wxUSE_DIALUP_MANAGER 0
+#    endif
+#endif /* !defined(wxUSE_DIALUP_MANAGER) */
+
+#ifndef wxUSE_MS_HTML_HELP
+#    ifdef wxABORT_ON_CONFIG_ERROR
+#        error "wxUSE_MS_HTML_HELP must be defined."
+#    else
+#        define wxUSE_MS_HTML_HELP 0
+#    endif
+#endif /* !defined(wxUSE_MS_HTML_HELP) */
+
+#ifndef wxUSE_OLE
+#    ifdef wxABORT_ON_CONFIG_ERROR
+#        error "wxUSE_OLE must be defined."
+#    else
+#        define wxUSE_OLE 0
+#    endif
+#endif /* !defined(wxUSE_OLE) */
+
+#ifndef wxUSE_OLE_AUTOMATION
+#    ifdef wxABORT_ON_CONFIG_ERROR
+#        error "wxUSE_OLE_AUTOMATION must be defined."
+#    else
+#        define wxUSE_OLE_AUTOMATION 0
+#    endif
+#endif /* !defined(wxUSE_OLE_AUTOMATION) */
+
 #ifndef wxUSE_UNICODE_MSLU
 #    ifdef wxABORT_ON_CONFIG_ERROR
 #        error "wxUSE_UNICODE_MSLU must be defined."
 #    endif
 #endif  /* wxUSE_UXTHEME_AUTO */
 
-#ifndef wxUSE_MS_HTML_HELP
-#    ifdef wxABORT_ON_CONFIG_ERROR
-#        error "wxUSE_MS_HTML_HELP must be defined."
-#    else
-#        define wxUSE_MS_HTML_HELP 0
-#    endif
-#endif /* !defined(wxUSE_MS_HTML_HELP) */
 
-#ifndef wxUSE_DIALUP_MANAGER
-#    ifdef wxABORT_ON_CONFIG_ERROR
-#        error "wxUSE_DIALUP_MANAGER must be defined."
-#    else
-#        define wxUSE_DIALUP_MANAGER 0
-#    endif
-#endif /* !defined(wxUSE_DIALUP_MANAGER) */
+/*
+   un/redefine the options which we can't compile (after checking that they're
+   defined
+ */
+#ifdef __WINE__
+    /* apparently it doesn't compile under Wine, remove it/when it does */
+    #if wxUSE_ACTIVEX
+        #undef wxUSE_ACTIVEX
+        #define wxUSE_ACTIVEX 0
+    #endif // wxUSE_ACTIVEX
+#endif // __WINE__
+
 
 /* check settings consistency for MSW-specific ones */
 #if !wxUSE_VARIANT
+#   if wxUSE_ACTIVEX
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxActiveXContainer requires wxVariant"
+#       else
+#           undef wxUSE_ACTIVEX
+#           define wxUSE_ACTIVEX 0
+#       endif
+#   endif
+
 #   if wxUSE_OLE_AUTOMATION
 #       ifdef wxABORT_ON_CONFIG_ERROR
 #           error "wxAutomationObject requires wxVariant"
 #           define wxUSE_OLE_AUTOMATION 0
 #       endif
 #   endif
-#endif /* wxUSE_VARIANT */
+#endif /* !wxUSE_VARIANT */
 
 #if !wxUSE_DYNAMIC_LOADER
 #    if wxUSE_MS_HTML_HELP
 #            define wxUSE_DIALUP_MANAGER 0
 #        endif
 #    endif
-#endif  /* wxUSE_DYNAMIC_LOADER */
+#endif  /* !wxUSE_DYNAMIC_LOADER */
 
 #if !wxUSE_DYNLIB_CLASS
 #   if wxUSE_UXTHEME
 #           define wxUSE_INKEDIT 0
 #       endif
 #   endif
-#endif  /* wxUSE_DYNLIB_CLASS */
+#endif  /* !wxUSE_DYNLIB_CLASS */
 
 #if !wxUSE_OLE
+#   if wxUSE_ACTIVEX
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxActiveXContainer requires wxUSE_OLE"
+#       else
+#           undef wxUSE_ACTIVEX
+#           define wxUSE_ACTIVEX 0
+#       endif
+#   endif
+
 #   if wxUSE_DATAOBJ
 #       ifdef wxABORT_ON_CONFIG_ERROR
 #           error "wxUSE_DATAOBJ requires wxUSE_OLE"
 #           define wxUSE_OLE_AUTOMATION 0
 #       endif
 #   endif
-#endif /* wxUSE_OLE */
+#endif /* !wxUSE_OLE */
+
+#if !wxUSE_ACTIVEX
+#   if wxUSE_MEDIACTRL
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxMediaCtl requires wxActiveXContainer"
+#       else
+#           undef wxUSE_MEDIACTRL
+#           define wxUSE_MEDIACTRL 0
+#       endif
+#   endif
+#endif /* !wxUSE_ACTIVEX */
 
 #endif /* _WX_MSW_CHKCONF_H_ */
index 31a9eb2a4c2e5a16ed023511ccaf01213f419c82..5635819639c10a4b2044d7204574df986d8ddb03 100644 (file)
 #ifndef _WX_MSW_OLE_ACTIVEXCONTAINER_H_
 #define _WX_MSW_OLE_ACTIVEXCONTAINER_H_
 
-//---------------------------------------------------------------------------
-//  COM includes
-//---------------------------------------------------------------------------
-#include "wx/msw/ole/oleutils.h" //wxBasicString, IID etc.
-#include "wx/msw/ole/uuid.h" //IID etc..
+#if wxUSE_ACTIVEX
 
 //---------------------------------------------------------------------------
-//  COM compatability definitions
+// wx includes
 //---------------------------------------------------------------------------
-#ifndef STDMETHODCALLTYPE
-#define STDMETHODCALLTYPE __stdcall
-#endif
-#ifndef STDMETHOD
-#define STDMETHOD(funcname)  virtual HRESULT STDMETHODCALLTYPE funcname
-#endif
-#ifndef PURE
-#define PURE = 0
-#endif
-#ifndef __RPC_FAR
-#define __RPC_FAR FAR
-#endif
 
-//---------------------------------------------------------------------------
-//  WX includes
-//---------------------------------------------------------------------------
+#include "wx/msw/ole/oleutils.h" // wxBasicString &c
+#include "wx/msw/ole/uuid.h"
 #include "wx/window.h"
 #include "wx/variant.h"
 
 
 #include <docobj.h>
 
+#ifndef STDMETHOD
+    #define STDMETHOD(funcname)  virtual HRESULT wxSTDCALL funcname
+#endif
+
 //
 //  These defines are from another ole header - but its not in the
 //  latest sdk.  Also the ifndef DISPID_READYSTATE is here because at
 //  least on my machine with the latest sdk olectl.h defines these 3
 //
 #ifndef DISPID_READYSTATE
-    #define DISPID_READYSTATE                               -525
-    #define DISPID_READYSTATECHANGE                         -609
-    #define DISPID_AMBIENT_TRANSFERPRIORITY                 -728
+    #define DISPID_READYSTATE                               (-525)
+    #define DISPID_READYSTATECHANGE                         (-609)
+    #define DISPID_AMBIENT_TRANSFERPRIORITY                 (-728)
 #endif
 
-#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED            -5501
-#define DISPID_AMBIENT_SILENT                           -5502
+#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED            (-5501)
+#define DISPID_AMBIENT_SILENT                           (-5502)
 
 #ifndef DISPID_AMBIENT_CODEPAGE
-#   define DISPID_AMBIENT_CODEPAGE                         -725
-#   define DISPID_AMBIENT_CHARSET                          -727
+    #define DISPID_AMBIENT_CODEPAGE                         (-725)
+    #define DISPID_AMBIENT_CHARSET                          (-727)
 #endif
 
 
@@ -228,4 +215,6 @@ typedef void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&);
 #define wxActiveXEventHandler(func) \
     (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxActiveXEventFunction, &func)
 
+#endif // wxUSE_ACTIVEX
+
 #endif // _WX_MSW_OLE_ACTIVEXCONTAINER_H_
index 30321ff61048f080dbeb712d188113f8862e3237..18c02c696dcf8d171164c8955d95407ff929b4dc 100644 (file)
 // Automation, can be safely set to 0 otherwise
 #define wxUSE_OLE_AUTOMATION 1
 
+// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE
+// controls in wx.
+//
+// Default is 1.
+//
+// Recommended setting: 1, required by wxMediaCtrl
+#define wxUSE_ACTIVEX 1
+
 // wxDC cacheing implementation
 #define wxUSE_DC_CACHEING 1
 
index 60ae8105ba6120be41301cc3601f3372525ebd9a..3195952c7855283909aaf88e33c47147c49d830f 100644 (file)
  */
 #define wxUSE_OLE 0
 #define wxUSE_OLE_AUTOMATION 0
+#define wxUSE_ACTIVEX 0
 
 /* for compatibility */
 #define wxUSE_WX_RESOURCES wxUSE_RESOURCES
index 23415001823e0cde63d73f42a8bb7c1c1dae6dd2..2c53f2962995baf09813186fd81abb08d3032bb5 100644 (file)
     #pragma hdrstop
 #endif
 
+#if wxUSE_ACTIVEX
+
 #ifndef WX_PRECOMP
     #include "wx/dcclient.h"
     #include "wx/math.h"
 #endif
 
-// I don't know why members of tagVARIANT aren't found when compiling
-// with Wine
-#ifndef __WINE__
-
 #include "wx/msw/ole/activex.h"
 // autointerfaces that we only use here
 WX_DECLARE_AUTOOLE(wxAutoIOleInPlaceSite, IOleInPlaceSite)
@@ -1163,5 +1161,4 @@ void wxActiveXContainer::OnKillFocus(wxFocusEvent& event)
     event.Skip();
 }
 
-#endif
-// __WINE__
+#endif // wxUSE_ACTIVEX