\section{wxactivex.h File Reference}
\label{wxactivex_8h}\index{wxactivex.h@{wxactivex.h}}


\subsection{Detailed Description}
implements {\bf wx\-Active\-X} window class and OLE tools



Definition in file {\bf wxactivex.h}.

{\tt \#include $<$wx/setup.h$>$}\par
{\tt \#include $<$wx/wx.h$>$}\par
{\tt \#include $<$wx/variant.h$>$}\par
{\tt \#include $<$wx/datetime.h$>$}\par
{\tt \#include $<$oleidl.h$>$}\par
{\tt \#include $<$exdisp.h$>$}\par
{\tt \#include $<$docobj.h$>$}\par
{\tt \#include $<$iostream$>$}\par
{\tt \#include $<$vector$>$}\par
{\tt \#include $<$map$>$}\par
\subsection*{Namespaces}
\begin{CompactItemize}
\item 
namespace {\bf NS\_\-wx\-Active\-X}
\item 
namespace {\bf std}
\end{CompactItemize}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
class {\bf wx\-Auto\-Ole\-Interface}
\begin{CompactList}\small\item\em Template class for smart interface handling.\item\end{CompactList}\item 
class {\bf wx\-Active\-X}
\begin{CompactList}\small\item\em Main class for embedding a Active\-X control.\item\end{CompactList}\item 
class {\bf Param\-X}
\begin{CompactList}\small\item\em General parameter and return type infoformation for Events, Properties and Methods.\item\end{CompactList}\item 
class {\bf Func\-X}
\begin{CompactList}\small\item\em Type \& Parameter info for Events and Methods.\item\end{CompactList}\item 
class {\bf Prop\-X}
\begin{CompactList}\small\item\em Type info for properties.\item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\index{EVT_ACTIVEX@{EVT\_\-ACTIVEX}!wxactivex.h@{wxactivex.h}}\index{wxactivex.h@{wxactivex.h}!EVT_ACTIVEX@{EVT\_\-ACTIVEX}}
\#define {\bf EVT\_\-ACTIVEX}(id, event\-Name, fn)\ DECLARE\_\-EVENT\_\-TABLE\_\-ENTRY(Register\-Active\-XEvent(wx\-T(event\-Name)), id, -1, (wx\-Object\-Event\-Function) (wx\-Event\-Function) (wx\-Active\-XEvent\-Function) \& fn, (wx\-Object $\ast$) NULL ),\label{wxactivex_8h_a10}

\begin{CompactList}\small\item\em Event handle for events by name.\item\end{CompactList}\item 
\index{EVT_ACTIVEX_DISPID@{EVT\_\-ACTIVEX\_\-DISPID}!wxactivex.h@{wxactivex.h}}\index{wxactivex.h@{wxactivex.h}!EVT_ACTIVEX_DISPID@{EVT\_\-ACTIVEX\_\-DISPID}}
\#define {\bf EVT\_\-ACTIVEX\_\-DISPID}(id, event\-Disp\-Id, fn)\ DECLARE\_\-EVENT\_\-TABLE\_\-ENTRY(Register\-Active\-XEvent(event\-Disp\-Id), id, -1, (wx\-Object\-Event\-Function) (wx\-Event\-Function) (wx\-Active\-XEvent\-Function) \& fn, (wx\-Object $\ast$) NULL ),\label{wxactivex_8h_a11}

\begin{CompactList}\small\item\em Event handle for events by DISPID (dispath id).\item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\index{OLEHResultToString@{OLEHResultToString}!wxactivex.h@{wxactivex.h}}\index{wxactivex.h@{wxactivex.h}!OLEHResultToString@{OLEHResultToString}}
wx\-String {\bf OLEHResult\-To\-String} (HRESULT hr)\label{wxactivex_8h_a13}

\begin{CompactList}\small\item\em Converts a std HRESULT to its error code. Hardcoded, by no means a definitive list.\item\end{CompactList}\item 
\index{GetIIDName@{GetIIDName}!wxactivex.h@{wxactivex.h}}\index{wxactivex.h@{wxactivex.h}!GetIIDName@{GetIIDName}}
wx\-String {\bf Get\-IIDName} (REFIID riid)\label{wxactivex_8h_a14}

\begin{CompactList}\small\item\em Returns the string description of a IID. Hardcoded, by no means a definitive list.\item\end{CompactList}\end{CompactItemize}


\subsection{Define Documentation}
\index{wxactivex.h@{wxactivex.h}!DECLARE_OLE_UNKNOWN@{DECLARE\_\-OLE\_\-UNKNOWN}}
\index{DECLARE_OLE_UNKNOWN@{DECLARE\_\-OLE\_\-UNKNOWN}!wxactivex.h@{wxactivex.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define DECLARE\_\-OLE\_\-UNKNOWN(cls)}\label{wxactivex_8h_a3}


{\bf Value:}

\footnotesize\begin{verbatim}private:\
    class TAutoInitInt\
    {\
        public:\
        LONG l;\
        TAutoInitInt() : l(0) {}\
    };\
    TAutoInitInt refCount, lockCount;\
    wxOleInit oleInit;\
        static void _GetInterface(cls *self, REFIID iid, void **_interface, const char *&desc);\
    public:\
    LONG GetRefCount();\
        HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void ** ppvObject);\
        ULONG STDMETHODCALLTYPE AddRef();\
        ULONG STDMETHODCALLTYPE Release();\
    ULONG STDMETHODCALLTYPE AddLock();\
        ULONG STDMETHODCALLTYPE ReleaseLock()
\end{verbatim}\normalsize 


Definition at line 184 of file wxactivex.h.\index{wxactivex.h@{wxactivex.h}!DEFINE_OLE_BASE@{DEFINE\_\-OLE\_\-BASE}}
\index{DEFINE_OLE_BASE@{DEFINE\_\-OLE\_\-BASE}!wxactivex.h@{wxactivex.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define DEFINE\_\-OLE\_\-BASE(cls)}\label{wxactivex_8h_a5}


{\bf Value:}

\footnotesize\begin{verbatim}void cls::_GetInterface(cls *self, REFIID iid, void **_interface, const char *&desc)\
        {\
                *_interface = NULL;\
            desc = NULL;
\end{verbatim}\normalsize 


Definition at line 264 of file wxactivex.h.\index{wxactivex.h@{wxactivex.h}!OLE_INTERFACE@{OLE\_\-INTERFACE}}
\index{OLE_INTERFACE@{OLE\_\-INTERFACE}!wxactivex.h@{wxactivex.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define OLE\_\-INTERFACE(\_\-iid, \_\-type)}\label{wxactivex_8h_a6}


{\bf Value:}

\footnotesize\begin{verbatim}if (IsEqualIID(iid, _iid))\
    {\
        WXOLE_TRACE("Found Interface <" # _type ">");\
        *_interface = (IUnknown *) (_type *) self;\
        desc = # _iid;\
        return;\
    }
\end{verbatim}\normalsize 


Definition at line 270 of file wxactivex.h.\index{wxactivex.h@{wxactivex.h}!OLE_INTERFACE_CUSTOM@{OLE\_\-INTERFACE\_\-CUSTOM}}
\index{OLE_INTERFACE_CUSTOM@{OLE\_\-INTERFACE\_\-CUSTOM}!wxactivex.h@{wxactivex.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define OLE\_\-INTERFACE\_\-CUSTOM(func)}\label{wxactivex_8h_a8}


{\bf Value:}

\footnotesize\begin{verbatim}if (func(self, iid, _interface, desc))\
        {\
        return;\
        }
\end{verbatim}\normalsize 


Definition at line 281 of file wxactivex.h.