]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/activex/wxie/doxydoc/wxactivex_8h-source.html
Moved config.py to the root because if wxPython hasn't been built yet
[wxWidgets.git] / wxPython / contrib / activex / wxie / doxydoc / wxactivex_8h-source.html
CommitLineData
b7c75283
RD
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>wxactivex.h Source File</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5</head><body>
6<!-- Generated by Doxygen 1.3-rc3 -->
7<center>
8<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
9<hr><h1>wxactivex.h</h1><a href="wxactivex_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
1000005 <span class="preprocessor">#ifndef WX_ACTIVE_X</span>
1100006 <span class="preprocessor"></span><span class="preprocessor">#define WX_ACTIVE_X</span>
1200007 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4101 4786)</span>
1300008 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4786)</span>
1400009 <span class="preprocessor"></span>
1500010
1600011 <span class="preprocessor">#include &lt;wx/setup.h&gt;</span>
1700012 <span class="preprocessor">#include &lt;wx/wx.h&gt;</span>
1800013 <span class="preprocessor">#include &lt;wx/variant.h&gt;</span>
1900014 <span class="preprocessor">#include &lt;wx/datetime.h&gt;</span>
2000015 <span class="preprocessor">#include &lt;oleidl.h&gt;</span>
2100016 <span class="preprocessor">#include &lt;exdisp.h&gt;</span>
2200017 <span class="preprocessor">#include &lt;docobj.h&gt;</span>
2300018 <span class="preprocessor">#include &lt;iostream&gt;</span>
2400019 <span class="preprocessor">#include &lt;vector&gt;</span>
2500020 <span class="preprocessor">#include &lt;map&gt;</span>
2600021 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
2700022
28<a name="l00024"></a><a class="code" href="namespaceNS__wxActiveX.html">00024</a> <span class="keyword">namespace </span>NS_wxActiveX
2900025 {
30<a name="l00029"></a><a class="code" href="structNS__wxActiveX_1_1less__wxStringI.html">00029</a> <span class="keyword">struct </span><a class="code" href="structNS__wxActiveX_1_1less__wxStringI.html">less_wxStringI</a>
3100030 {
3200031 <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> wxString&amp; x, <span class="keyword">const</span> wxString&amp; y)<span class="keyword"> const</span>
3300032 <span class="keyword"> </span>{
3400033 <span class="keywordflow">return</span> x.CmpNoCase(y) &lt; 0;
3500034 };
3600035 };
3700036 };
3800037
3900038
40<a name="l00045"></a><a class="code" href="classwxAutoOleInterface.html">00045</a> <span class="keyword">template</span> &lt;<span class="keyword">class</span> I&gt; <span class="keyword">class </span><a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface</a>
4100046 {
4200047 <span class="keyword">protected</span>:
4300048 I *m_interface;
4400049
4500050 <span class="keyword">public</span>:
46<a name="l00053"></a><a class="code" href="classwxAutoOleInterface.html#a0">00053</a> <span class="keyword">explicit</span> <a class="code" href="classwxAutoOleInterface.html#a0">wxAutoOleInterface</a>(I *pInterface = NULL) : m_interface(pInterface) {}
4700054
48<a name="l00056"></a><a class="code" href="classwxAutoOleInterface.html#a1">00056</a> <a class="code" href="classwxAutoOleInterface.html#a0">wxAutoOleInterface</a>(REFIID riid, IUnknown *pUnk) : m_interface(NULL)
4900057 {
5000058 <a class="code" href="classwxAutoOleInterface.html#a9">QueryInterface</a>(riid, pUnk);
5100059 };
52<a name="l00061"></a><a class="code" href="classwxAutoOleInterface.html#a2">00061</a> <a class="code" href="classwxAutoOleInterface.html#a0">wxAutoOleInterface</a>(REFIID riid, IDispatch *pDispatch) : m_interface(NULL)
5300062 {
5400063 <a class="code" href="classwxAutoOleInterface.html#a9">QueryInterface</a>(riid, pDispatch);
5500064 };
5600065
57<a name="l00067"></a><a class="code" href="classwxAutoOleInterface.html#a3">00067</a> <a class="code" href="classwxAutoOleInterface.html#a0">wxAutoOleInterface</a>(REFCLSID clsid, REFIID riid) : m_interface(NULL)
5800068 {
5900069 <a class="code" href="classwxAutoOleInterface.html#a10">CreateInstance</a>(clsid, riid);
6000070 };
6100071
62<a name="l00073"></a><a class="code" href="classwxAutoOleInterface.html#a4">00073</a> <a class="code" href="classwxAutoOleInterface.html#a0">wxAutoOleInterface</a>(<span class="keyword">const</span> <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;I&gt;</a>&amp; ti) : m_interface(NULL)
6300074 {
6400075 <a class="code" href="classwxAutoOleInterface.html#a5">operator = </a>(ti);
6500076 }
6600077
67<a name="l00079"></a><a class="code" href="classwxAutoOleInterface.html#a5">00079</a> <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;I&gt;</a>&amp; <a class="code" href="classwxAutoOleInterface.html#a5">operator = </a>(<span class="keyword">const</span> <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;I&gt;</a>&amp; ti)
6800080 {
6900081 <span class="keywordflow">if</span> (ti.<a class="code" href="classwxAutoOleInterface.html#n0">m_interface</a>)
7000082 ti.<a class="code" href="classwxAutoOleInterface.html#n0">m_interface</a>-&gt;AddRef();
7100083 <a class="code" href="classwxAutoOleInterface.html#a8">Free</a>();
7200084 m_interface = ti.<a class="code" href="classwxAutoOleInterface.html#n0">m_interface</a>;
7300085 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
7400086 }
7500087
76<a name="l00090"></a><a class="code" href="classwxAutoOleInterface.html#a6">00090</a> <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;I&gt;</a>&amp; <a class="code" href="classwxAutoOleInterface.html#a5">operator = </a>(I *&amp;ti)
7700091 {
7800092 <a class="code" href="classwxAutoOleInterface.html#a8">Free</a>();
7900093 m_interface = ti;
8000094 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
8100095 }
8200096
83<a name="l00098"></a><a class="code" href="classwxAutoOleInterface.html#a7">00098</a> <a class="code" href="classwxAutoOleInterface.html#a7">~wxAutoOleInterface</a>()
8400099 {
8500100 <a class="code" href="classwxAutoOleInterface.html#a8">Free</a>();
8600101 };
8700102
8800103
89<a name="l00105"></a><a class="code" href="classwxAutoOleInterface.html#a8">00105</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classwxAutoOleInterface.html#a8">Free</a>()
9000106 {
9100107 <span class="keywordflow">if</span> (m_interface)
9200108 m_interface-&gt;Release();
9300109 m_interface = NULL;
9400110 };
9500111
96<a name="l00113"></a><a class="code" href="classwxAutoOleInterface.html#a9">00113</a> HRESULT <a class="code" href="classwxAutoOleInterface.html#a9">QueryInterface</a>(REFIID riid, IUnknown *pUnk)
9700114 {
9800115 <a class="code" href="classwxAutoOleInterface.html#a8">Free</a>();
9900116 wxASSERT(pUnk != NULL);
10000117 <span class="keywordflow">return</span> pUnk-&gt;QueryInterface(riid, (<span class="keywordtype">void</span> **) &amp;m_interface);
10100118 };
10200119
103<a name="l00121"></a><a class="code" href="classwxAutoOleInterface.html#a10">00121</a> HRESULT <a class="code" href="classwxAutoOleInterface.html#a10">CreateInstance</a>(REFCLSID clsid, REFIID riid)
10400122 {
10500123 <a class="code" href="classwxAutoOleInterface.html#a8">Free</a>();
10600124 <span class="keywordflow">return</span> CoCreateInstance(clsid, NULL, CLSCTX_ALL, riid, (<span class="keywordtype">void</span> **) &amp;m_interface);
10700125 };
10800126
10900127
110<a name="l00129"></a><a class="code" href="classwxAutoOleInterface.html#a11">00129</a> <span class="keyword">inline</span> <a class="code" href="classwxAutoOleInterface.html#a11">operator I *</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_interface;}
11100130
112<a name="l00132"></a><a class="code" href="classwxAutoOleInterface.html#a12">00132</a> <span class="keyword">inline</span> I* <a class="code" href="classwxAutoOleInterface.html#a12">operator -&gt;</a>() {<span class="keywordflow">return</span> m_interface;}
113<a name="l00134"></a><a class="code" href="classwxAutoOleInterface.html#a13">00134</a> <span class="keyword">inline</span> I** <a class="code" href="classwxAutoOleInterface.html#a13">GetRef</a>() {<span class="keywordflow">return</span> &amp;m_interface;}
114<a name="l00136"></a><a class="code" href="classwxAutoOleInterface.html#a14">00136</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classwxAutoOleInterface.html#a14">Ok</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_interface != NULL;}
11500137 };
11600138
11700139
11800142 wxString <a class="code" href="wxactivex_8h.html#a13">OLEHResultToString</a>(HRESULT hr);
11900145 wxString <a class="code" href="wxactivex_8h.html#a14">GetIIDName</a>(REFIID riid);
12000146
12100147 <span class="comment">//#define __WXOLEDEBUG</span>
12200148
12300149
12400150 <span class="preprocessor">#ifdef __WXOLEDEBUG</span>
12500151 <span class="preprocessor"></span><span class="preprocessor"> #define WXOLE_TRACE(str) {OutputDebugString(str);OutputDebugString("\r\n");}</span>
12600152 <span class="preprocessor"></span><span class="preprocessor"> #define WXOLE_TRACEOUT(stuff)\</span>
12700153 <span class="preprocessor"> {\</span>
12800154 <span class="preprocessor"> wxString os;\</span>
12900155 <span class="preprocessor"> os &lt;&lt; stuff &lt;&lt; "\r\n";\</span>
13000156 <span class="preprocessor"> WXOLE_TRACE(os.mb_str());\</span>
13100157 <span class="preprocessor"> }</span>
13200158 <span class="preprocessor"></span>
13300159 <span class="preprocessor"> #define WXOLE_WARN(__hr,msg)\</span>
13400160 <span class="preprocessor"> {\</span>
13500161 <span class="preprocessor"> if (__hr != S_OK)\</span>
13600162 <span class="preprocessor"> {\</span>
13700163 <span class="preprocessor"> wxString s = "*** ";\</span>
13800164 <span class="preprocessor"> s += msg;\</span>
13900165 <span class="preprocessor"> s += " : "+ OLEHResultToString(__hr);\</span>
14000166 <span class="preprocessor"> WXOLE_TRACE(s.c_str());\</span>
14100167 <span class="preprocessor"> }\</span>
14200168 <span class="preprocessor"> }</span>
14300169 <span class="preprocessor"></span><span class="preprocessor">#else</span>
14400170 <span class="preprocessor"></span><span class="preprocessor"> #define WXOLE_TRACE(str)</span>
14500171 <span class="preprocessor"></span><span class="preprocessor"> #define WXOLE_TRACEOUT(stuff)</span>
14600172 <span class="preprocessor"></span><span class="preprocessor"> #define WXOLE_WARN(_proc,msg) {_proc;}</span>
14700173 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
14800174 <span class="preprocessor"></span>
14900175 <span class="keyword">class </span>wxOleInit
15000176 {
15100177 <span class="keyword">public</span>:
15200178 <span class="keyword">static</span> IMalloc *GetIMalloc();
15300179
15400180 wxOleInit();
15500181 ~wxOleInit();
15600182 };
15700183
15800184 <span class="preprocessor">#define DECLARE_OLE_UNKNOWN(cls)\</span>
15900185 <span class="preprocessor"> private:\</span>
16000186 <span class="preprocessor"> class TAutoInitInt\</span>
16100187 <span class="preprocessor"> {\</span>
16200188 <span class="preprocessor"> public:\</span>
16300189 <span class="preprocessor"> LONG l;\</span>
16400190 <span class="preprocessor"> TAutoInitInt() : l(0) {}\</span>
16500191 <span class="preprocessor"> };\</span>
16600192 <span class="preprocessor"> TAutoInitInt refCount, lockCount;\</span>
16700193 <span class="preprocessor"> wxOleInit oleInit;\</span>
16800194 <span class="preprocessor"> static void _GetInterface(cls *self, REFIID iid, void **_interface, const char *&amp;desc);\</span>
16900195 <span class="preprocessor"> public:\</span>
17000196 <span class="preprocessor"> LONG GetRefCount();\</span>
17100197 <span class="preprocessor"> HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void ** ppvObject);\</span>
17200198 <span class="preprocessor"> ULONG STDMETHODCALLTYPE AddRef();\</span>
17300199 <span class="preprocessor"> ULONG STDMETHODCALLTYPE Release();\</span>
17400200 <span class="preprocessor"> ULONG STDMETHODCALLTYPE AddLock();\</span>
17500201 <span class="preprocessor"> ULONG STDMETHODCALLTYPE ReleaseLock()</span>
17600202 <span class="preprocessor"></span>
17700203 <span class="preprocessor">#define DEFINE_OLE_TABLE(cls)\</span>
17800204 <span class="preprocessor"> LONG cls::GetRefCount() {return refCount.l;}\</span>
17900205 <span class="preprocessor"> HRESULT STDMETHODCALLTYPE cls::QueryInterface(REFIID iid, void ** ppvObject)\</span>
18000206 <span class="preprocessor"> {\</span>
18100207 <span class="preprocessor"> if (! ppvObject)\</span>
18200208 <span class="preprocessor"> {\</span>
18300209 <span class="preprocessor"> WXOLE_TRACE("*** NULL POINTER ***");\</span>
18400210 <span class="preprocessor"> return E_FAIL;\</span>
18500211 <span class="preprocessor"> };\</span>
18600212 <span class="preprocessor"> const char *desc = NULL;\</span>
18700213 <span class="preprocessor"> cls::_GetInterface(this, iid, ppvObject, desc);\</span>
18800214 <span class="preprocessor"> if (! *ppvObject)\</span>
18900215 <span class="preprocessor"> {\</span>
19000216 <span class="preprocessor"> WXOLE_TRACEOUT("&lt;" &lt;&lt; GetIIDName(iid).c_str() &lt;&lt; "&gt; Not Found");\</span>
19100217 <span class="preprocessor"> return E_NOINTERFACE;\</span>
19200218 <span class="preprocessor"> };\</span>
19300219 <span class="preprocessor"> WXOLE_TRACEOUT("QI : &lt;" &lt;&lt; desc &lt;&lt;"&gt;");\</span>
19400220 <span class="preprocessor"> ((IUnknown * )(*ppvObject))-&gt;AddRef();\</span>
19500221 <span class="preprocessor"> return S_OK;\</span>
19600222 <span class="preprocessor"> };\</span>
19700223 <span class="preprocessor"> ULONG STDMETHODCALLTYPE cls::AddRef()\</span>
19800224 <span class="preprocessor"> {\</span>
19900225 <span class="preprocessor"> WXOLE_TRACEOUT(# cls &lt;&lt; "::Add ref(" &lt;&lt; refCount.l &lt;&lt; ")");\</span>
20000226 <span class="preprocessor"> InterlockedIncrement(&amp;refCount.l);\</span>
20100227 <span class="preprocessor"> return refCount.l;\</span>
20200228 <span class="preprocessor"> };\</span>
20300229 <span class="preprocessor"> ULONG STDMETHODCALLTYPE cls::Release()\</span>
20400230 <span class="preprocessor"> {\</span>
20500231 <span class="preprocessor"> if (refCount.l &gt; 0)\</span>
20600232 <span class="preprocessor"> {\</span>
20700233 <span class="preprocessor"> InterlockedDecrement(&amp;refCount.l);\</span>
20800234 <span class="preprocessor"> WXOLE_TRACEOUT(# cls &lt;&lt; "::Del ref(" &lt;&lt; refCount.l &lt;&lt; ")");\</span>
20900235 <span class="preprocessor"> if (refCount.l == 0)\</span>
21000236 <span class="preprocessor"> {\</span>
21100237 <span class="preprocessor"> delete this;\</span>
21200238 <span class="preprocessor"> return 0;\</span>
21300239 <span class="preprocessor"> };\</span>
21400240 <span class="preprocessor"> return refCount.l;\</span>
21500241 <span class="preprocessor"> }\</span>
21600242 <span class="preprocessor"> else\</span>
21700243 <span class="preprocessor"> return 0;\</span>
21800244 <span class="preprocessor"> }\</span>
21900245 <span class="preprocessor"> ULONG STDMETHODCALLTYPE cls::AddLock()\</span>
22000246 <span class="preprocessor"> {\</span>
22100247 <span class="preprocessor"> WXOLE_TRACEOUT(# cls &lt;&lt; "::Add Lock(" &lt;&lt; lockCount.l &lt;&lt; ")");\</span>
22200248 <span class="preprocessor"> InterlockedIncrement(&amp;lockCount.l);\</span>
22300249 <span class="preprocessor"> return lockCount.l;\</span>
22400250 <span class="preprocessor"> };\</span>
22500251 <span class="preprocessor"> ULONG STDMETHODCALLTYPE cls::ReleaseLock()\</span>
22600252 <span class="preprocessor"> {\</span>
22700253 <span class="preprocessor"> if (lockCount.l &gt; 0)\</span>
22800254 <span class="preprocessor"> {\</span>
22900255 <span class="preprocessor"> InterlockedDecrement(&amp;lockCount.l);\</span>
23000256 <span class="preprocessor"> WXOLE_TRACEOUT(# cls &lt;&lt; "::Del Lock(" &lt;&lt; lockCount.l &lt;&lt; ")");\</span>
23100257 <span class="preprocessor"> return lockCount.l;\</span>
23200258 <span class="preprocessor"> }\</span>
23300259 <span class="preprocessor"> else\</span>
23400260 <span class="preprocessor"> return 0;\</span>
23500261 <span class="preprocessor"> }\</span>
23600262 <span class="preprocessor"> DEFINE_OLE_BASE(cls)</span>
23700263 <span class="preprocessor"></span>
23800264 <span class="preprocessor">#define DEFINE_OLE_BASE(cls)\</span>
23900265 <span class="preprocessor"> void cls::_GetInterface(cls *self, REFIID iid, void **_interface, const char *&amp;desc)\</span>
24000266 <span class="preprocessor"> {\</span>
24100267 <span class="preprocessor"> *_interface = NULL;\</span>
24200268 <span class="preprocessor"> desc = NULL;</span>
24300269 <span class="preprocessor"></span>
24400270 <span class="preprocessor">#define OLE_INTERFACE(_iid, _type)\</span>
24500271 <span class="preprocessor"> if (IsEqualIID(iid, _iid))\</span>
24600272 <span class="preprocessor"> {\</span>
24700273 <span class="preprocessor"> WXOLE_TRACE("Found Interface &lt;" # _type "&gt;");\</span>
24800274 <span class="preprocessor"> *_interface = (IUnknown *) (_type *) self;\</span>
24900275 <span class="preprocessor"> desc = # _iid;\</span>
25000276 <span class="preprocessor"> return;\</span>
25100277 <span class="preprocessor"> }</span>
25200278 <span class="preprocessor"></span>
25300279 <span class="preprocessor">#define OLE_IINTERFACE(_face) OLE_INTERFACE(IID_##_face, _face)</span>
25400280 <span class="preprocessor"></span>
25500281 <span class="preprocessor">#define OLE_INTERFACE_CUSTOM(func)\</span>
25600282 <span class="preprocessor"> if (func(self, iid, _interface, desc))\</span>
25700283 <span class="preprocessor"> {\</span>
25800284 <span class="preprocessor"> return;\</span>
25900285 <span class="preprocessor"> }</span>
26000286 <span class="preprocessor"></span>
26100287 <span class="preprocessor">#define END_OLE_TABLE\</span>
26200288 <span class="preprocessor"> }</span>
26300289 <span class="preprocessor"></span>
26400290
26500328
266<a name="l00329"></a><a class="code" href="classwxActiveX.html">00329</a> <span class="keyword">class </span><a class="code" href="classwxActiveX.html">wxActiveX</a> : <span class="keyword">public</span> wxWindow {
26700330 <span class="keyword">public</span>:
268<a name="l00333"></a><a class="code" href="classwxActiveX_1_1ParamX.html">00333</a> <span class="keyword">class </span><a class="code" href="classwxActiveX_1_1ParamX.html">ParamX</a>
26900334 {
27000335 <span class="keyword">public</span>:
27100336 USHORT flags;
27200337 <span class="keywordtype">bool</span> isPtr, isSafeArray;
27300338 VARTYPE vt;
27400339 wxString name;
27500340
27600341 <a class="code" href="classwxActiveX_1_1ParamX.html">ParamX</a>() : vt(VT_EMPTY) {}
27700342 <span class="keyword">inline</span> <span class="keywordtype">bool</span> IsIn()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (flags &amp; IDLFLAG_FIN) != 0;}
27800343 <span class="keyword">inline</span> <span class="keywordtype">bool</span> IsOut()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (flags &amp; IDLFLAG_FOUT) != 0;}
27900344 <span class="keyword">inline</span> <span class="keywordtype">bool</span> IsRetVal()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (flags &amp; IDLFLAG_FRETVAL) != 0;}
28000345 };
28100346 <span class="keyword">typedef</span> vector&lt;ParamX&gt; ParamXArray;
28200347
283<a name="l00350"></a><a class="code" href="classwxActiveX_1_1FuncX.html">00350</a> <span class="keyword">class </span><a class="code" href="classwxActiveX_1_1FuncX.html">FuncX</a>
28400351 {
28500352 <span class="keyword">public</span>:
28600353 wxString name;
28700354 MEMBERID memid;
28800355 <span class="keywordtype">bool</span> hasOut;
28900356
29000357 <a class="code" href="classwxActiveX_1_1ParamX.html">ParamX</a> retType;
29100358 ParamXArray params;
29200359 };
29300360
294<a name="l00362"></a><a class="code" href="classwxActiveX_1_1PropX.html">00362</a> <span class="keyword">class </span><a class="code" href="classwxActiveX_1_1PropX.html">PropX</a>
29500363 {
29600364 <span class="keyword">public</span>:
29700365 wxString name;
29800366 MEMBERID memid;
29900367 <a class="code" href="classwxActiveX_1_1ParamX.html">ParamX</a> type;
30000368 <a class="code" href="classwxActiveX_1_1ParamX.html">ParamX</a> arg;
30100369 <span class="keywordtype">bool</span> putByRef;
30200370
30300371 <a class="code" href="classwxActiveX_1_1PropX.html">PropX</a>() : putByRef (<span class="keyword">false</span>) {}
30400372 <span class="keyword">inline</span> <span class="keywordtype">bool</span> CanGet()<span class="keyword"> const </span>{<span class="keywordflow">return</span> type.<a class="code" href="classwxActiveX_1_1ParamX.html#m3">vt</a> != VT_EMPTY;}
30500373 <span class="keyword">inline</span> <span class="keywordtype">bool</span> CanSet()<span class="keyword"> const </span>{<span class="keywordflow">return</span> arg.<a class="code" href="classwxActiveX_1_1ParamX.html#m3">vt</a> != VT_EMPTY;}
30600374 };
30700375
30800377 <a class="code" href="classwxActiveX.html#a0">wxActiveX</a>(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1,
30900378 <span class="keyword">const</span> wxPoint&amp; pos = wxDefaultPosition,
31000379 <span class="keyword">const</span> wxSize&amp; size = wxDefaultSize,
31100380 <span class="keywordtype">long</span> style = 0,
31200381 <span class="keyword">const</span> wxString&amp; name = wxPanelNameStr);
31300383 <a class="code" href="classwxActiveX.html#a0">wxActiveX</a>(wxWindow * parent, wxString progId, wxWindowID id = -1,
31400384 <span class="keyword">const</span> wxPoint&amp; pos = wxDefaultPosition,
31500385 <span class="keyword">const</span> wxSize&amp; size = wxDefaultSize,
31600386 <span class="keywordtype">long</span> style = 0,
31700387 <span class="keyword">const</span> wxString&amp; name = wxPanelNameStr);
31800388 <span class="keyword">virtual</span> ~<a class="code" href="classwxActiveX.html">wxActiveX</a>();
31900389
320<a name="l00391"></a><a class="code" href="classwxActiveX.html#a3">00391</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classwxActiveX.html#a3">GetEventCount</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_events.size();}
32100394 <span class="keyword">const</span> FuncX&amp; <a class="code" href="classwxActiveX.html#a4">GetEventDesc</a>(<span class="keywordtype">int</span> idx) <span class="keyword">const</span>;
32200395
323<a name="l00397"></a><a class="code" href="classwxActiveX.html#a5">00397</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classwxActiveX.html#a5">GetPropCount</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_props.size();}
32400400 <span class="keyword">const</span> PropX&amp; <a class="code" href="classwxActiveX.html#a6">GetPropDesc</a>(<span class="keywordtype">int</span> idx) <span class="keyword">const</span>;
32500403 <span class="keyword">const</span> PropX&amp; <a class="code" href="classwxActiveX.html#a6">GetPropDesc</a>(wxString name) <span class="keyword">const</span>;
32600404
327<a name="l00406"></a><a class="code" href="classwxActiveX.html#a8">00406</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classwxActiveX.html#a8">GetMethodCount</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_methods.size();}
32800409 <span class="keyword">const</span> FuncX&amp; <a class="code" href="classwxActiveX.html#a9">GetMethodDesc</a>(<span class="keywordtype">int</span> idx) <span class="keyword">const</span>;
32900412 <span class="keyword">const</span> FuncX&amp; <a class="code" href="classwxActiveX.html#a9">GetMethodDesc</a>(wxString name) <span class="keyword">const</span>;
33000413
33100415 <span class="keywordtype">void</span> <a class="code" href="classwxActiveX.html#a11">SetProp</a>(MEMBERID name, VARIANTARG&amp; value);
33200417 <span class="keywordtype">void</span> <a class="code" href="classwxActiveX.html#a11">SetProp</a>(<span class="keyword">const</span> wxString &amp;name, <span class="keyword">const</span> wxVariant &amp;value);
33300418
33400419 <span class="keyword">class </span>wxPropertySetter
33500420 {
33600421 <span class="keyword">public</span>:
33700422 <a class="code" href="classwxActiveX.html">wxActiveX</a> *m_ctl;
33800423 wxString m_propName;
33900424
34000425 wxPropertySetter(<a class="code" href="classwxActiveX.html">wxActiveX</a> *ctl, wxString propName) :
34100426 m_ctl(ctl), m_propName(propName) {}
34200427
34300428 <span class="keyword">inline</span> <span class="keyword">const</span> wxPropertySetter&amp; operator = (wxVariant v)<span class="keyword"> const</span>
34400429 <span class="keyword"> </span>{
34500430 m_ctl-&gt;<a class="code" href="classwxActiveX.html#a11">SetProp</a>(m_propName, v);
34600431 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
34700432 };
34800433
34900434 <span class="keyword">inline</span> operator wxVariant()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a16">GetPropAsWxVariant</a>(m_propName);};
35000435 <span class="keyword">inline</span> operator wxString()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a17">GetPropAsString</a>(m_propName);};
35100436 <span class="keyword">inline</span> operator char()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a18">GetPropAsChar</a>(m_propName);};
35200437 <span class="keyword">inline</span> operator long()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a19">GetPropAsLong</a>(m_propName);};
35300438 <span class="keyword">inline</span> operator bool()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a20">GetPropAsBool</a>(m_propName);};
35400439 <span class="keyword">inline</span> operator double()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a21">GetPropAsDouble</a>(m_propName);};
35500440 <span class="keyword">inline</span> operator wxDateTime()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a22">GetPropAsDateTime</a>(m_propName);};
35600441 <span class="keyword">inline</span> operator void *()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_ctl-&gt;<a class="code" href="classwxActiveX.html#a23">GetPropAsPointer</a>(m_propName);};
35700442 };
35800443
359<a name="l00458"></a><a class="code" href="classwxActiveX.html#a13">00458</a> <span class="keyword">inline</span> wxPropertySetter <a class="code" href="classwxActiveX.html#a13">Prop</a>(wxString name) {<span class="keywordflow">return</span> wxPropertySetter(<span class="keyword">this</span>, name);}
36000459
36100460 VARIANT GetPropAsVariant(MEMBERID name);
36200461 VARIANT GetPropAsVariant(<span class="keyword">const</span> wxString&amp; name);
36300462 wxVariant GetPropAsWxVariant(<span class="keyword">const</span> wxString&amp; name);
36400463 wxString GetPropAsString(<span class="keyword">const</span> wxString&amp; name);
36500464 <span class="keywordtype">char</span> GetPropAsChar(<span class="keyword">const</span> wxString&amp; name);
36600465 <span class="keywordtype">long</span> GetPropAsLong(<span class="keyword">const</span> wxString&amp; name);
36700466 <span class="keywordtype">bool</span> GetPropAsBool(<span class="keyword">const</span> wxString&amp; name);
36800467 <span class="keywordtype">double</span> GetPropAsDouble(<span class="keyword">const</span> wxString&amp; name);
36900468 wxDateTime GetPropAsDateTime(<span class="keyword">const</span> wxString&amp; name);
37000469 <span class="keywordtype">void</span> *GetPropAsPointer(<span class="keyword">const</span> wxString&amp; name);
37100470
37200471 <span class="comment">// methods</span>
37300472 <span class="comment">// VARIANTARG form is passed straight to Invoke, </span>
37400473 <span class="comment">// so args in *REVERSE* order</span>
37500474 VARIANT <a class="code" href="classwxActiveX.html#a26">CallMethod</a>(MEMBERID name, VARIANTARG args[], <span class="keywordtype">int</span> argc);
37600475 VARIANT <a class="code" href="classwxActiveX.html#a26">CallMethod</a>(wxString name, VARIANTARG args[] = NULL, <span class="keywordtype">int</span> argc = -1);
37700476 <span class="comment">// args are in *NORMAL* order</span>
37800477 <span class="comment">// args can be a single wxVariant or an array</span>
37900493 <span class="comment"> wxVariant CallMethod(wxString name, wxVariant args[], int nargs = -1);</span>
38000494
38100495 HRESULT ConnectAdvise(REFIID riid, IUnknown *eventSink);
38200496
38300497 <span class="keywordtype">void</span> OnSize(wxSizeEvent&amp;);
38400498 <span class="keywordtype">void</span> OnPaint(wxPaintEvent&amp; event);
38500499 <span class="keywordtype">void</span> OnMouse(wxMouseEvent&amp; event);
38600500 <span class="keywordtype">void</span> OnSetFocus(wxFocusEvent&amp;);
38700501 <span class="keywordtype">void</span> OnKillFocus(wxFocusEvent&amp;);
38800502
38900503 DECLARE_EVENT_TABLE();
39000504
39100505 <span class="keyword">protected</span>:
39200506 <span class="keyword">friend</span> <span class="keyword">class </span>FrameSite;
39300507 <span class="keyword">friend</span> <span class="keyword">class </span>wxActiveXEvents;
39400508
39500509 <span class="keyword">typedef</span> map&lt;MEMBERID, FuncX&gt; FuncXMap;
39600510 <span class="keyword">typedef</span> map&lt;wxString, FuncX, NS_wxActiveX::less_wxStringI&gt; FuncXStringMap;
39700511 <span class="keyword">typedef</span> map&lt;wxString, PropX, NS_wxActiveX::less_wxStringI&gt; PropXMap;
39800512 <span class="keyword">typedef</span> <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IConnectionPoint&gt;</a> wxOleConnectionPoint;
39900513 <span class="keyword">typedef</span> pair&lt;wxOleConnectionPoint, DWORD&gt; wxOleConnection;
40000514 <span class="keyword">typedef</span> vector&lt;wxOleConnection&gt; wxOleConnectionArray;
40100515
40200516 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IDispatch&gt;</a> m_Dispatch;
40300517 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IOleClientSite&gt;</a> m_clientSite;
40400518 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IUnknown&gt;</a> m_ActiveX;
40500519 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IOleObject&gt;</a> m_oleObject;
40600520 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IOleInPlaceObject&gt;</a> m_oleInPlaceObject;
40700521 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IOleInPlaceActiveObject&gt;</a>
40800522
40900523 m_oleInPlaceActiveObject;
41000524 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IOleDocumentView&gt;</a> m_docView;
41100525 <a class="code" href="classwxAutoOleInterface.html">wxAutoOleInterface&lt;IViewObject&gt;</a> m_viewObject;
41200526 HWND m_oleObjectHWND;
41300527 <span class="keywordtype">bool</span> m_bAmbientUserMode;
41400528 DWORD m_docAdviseCookie;
41500529 wxOleConnectionArray m_connections;
41600530
41700531 <span class="keywordtype">void</span> CreateActiveX(REFCLSID clsid);
41800532 <span class="keywordtype">void</span> CreateActiveX(LPOLESTR progId);
41900533 HRESULT AmbientPropertyChanged(DISPID dispid);
42000534
42100535 <span class="keywordtype">void</span> GetTypeInfo();
42200536 <span class="keywordtype">void</span> GetTypeInfo(ITypeInfo *ti, <span class="keywordtype">bool</span> defInterface, <span class="keywordtype">bool</span> defEventSink);
42300537
42400538
42500539 <span class="comment">// events</span>
42600540 FuncXMap m_events;
42700541
42800542 <span class="comment">// properties</span>
42900543 PropXMap m_props;
43000544
43100545 <span class="comment">// Methods</span>
43200546 FuncXStringMap m_methods;
43300547
43400548 <span class="keywordtype">long</span> MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
43500549 };
43600550
43700551 <span class="comment">// events</span>
43800552 <span class="keyword">class </span>wxActiveXEvent : <span class="keyword">public</span> wxCommandEvent
43900553 {
44000554 <span class="keyword">private</span>:
44100555 <span class="keyword">friend</span> <span class="keyword">class </span>wxActiveXEvents;
44200556
44300557 wxVariant m_params;
44400558
44500559 <span class="keyword">public</span>:
44600560
44700561 <span class="keyword">virtual</span> wxEvent *Clone()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">new</span> wxActiveXEvent(*<span class="keyword">this</span>); }
44800562
44900563 wxString EventName();
45000564 <span class="keywordtype">int</span> ParamCount() <span class="keyword">const</span>;
45100565 wxString ParamType(<span class="keywordtype">int</span> idx);
45200566 wxString ParamName(<span class="keywordtype">int</span> idx);
45300567 wxVariant&amp; operator[] (<span class="keywordtype">int</span> idx);
45400568 wxVariant&amp; operator[] (wxString name);
45500569 };
45600570
45700571 <span class="keyword">const</span> wxEventType&amp; RegisterActiveXEvent(<span class="keyword">const</span> wxChar *eventName);
45800572 <span class="keyword">const</span> wxEventType&amp; RegisterActiveXEvent(DISPID event);
45900573
46000574 <span class="keyword">typedef</span> void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&amp;);
46100575
462<a name="l00578"></a><a class="code" href="wxactivex_8h.html#a10">00578</a> <span class="preprocessor">#define EVT_ACTIVEX(id, eventName, fn) DECLARE_EVENT_TABLE_ENTRY(RegisterActiveXEvent(wxT(eventName)), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxActiveXEventFunction) &amp; fn, (wxObject *) NULL ),</span>
463<a name="l00581"></a><a class="code" href="wxactivex_8h.html#a11">00581</a> <span class="preprocessor">#define EVT_ACTIVEX_DISPID(id, eventDispId, fn) DECLARE_EVENT_TABLE_ENTRY(RegisterActiveXEvent(eventDispId), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxActiveXEventFunction) &amp; fn, (wxObject *) NULL ),</span>
46400582 <span class="preprocessor"></span>
46500583 <span class="comment">//util</span>
46600584 <span class="keywordtype">bool</span> wxDateTimeToVariant(wxDateTime dt, VARIANTARG&amp; va);
46700585 <span class="keywordtype">bool</span> VariantToWxDateTime(VARIANTARG va, wxDateTime&amp; dt);
46800596 <span class="keywordtype">bool</span> MSWVariantToVariant(VARIANTARG&amp; va, wxVariant&amp; vx);
46900607 <span class="keywordtype">bool</span> VariantToMSWVariant(<span class="keyword">const</span> wxVariant&amp; vx, VARIANTARG&amp; va);
47000608
47100609 <span class="preprocessor">#endif </span><span class="comment">/* _IEHTMLWIN_H_ */</span>
472</pre></div><hr><address style="align: right;"><small>Generated on Tue Apr 1 14:51:12 2003 for wxActiveX by
473<a href="http://www.doxygen.org/index.html">
474<img src="doxygen.png" alt="doxygen" align="middle" border=0
475width=110 height=53></a>1.3-rc3 </small></address>
476</body>
477</html>