]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/msw/ole/activex.h
use UnsetToolTip() instead of SetToolTip(NULL) to fix wxX11 build broken on Buildbot...
[wxWidgets.git] / interface / wx / msw / ole / activex.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msw/ole/activex.h
3 // Purpose: interface of wxActiveXEvent
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxActiveXEvent
11
12 An event class for handling activex events passed from wxActiveXContainer.
13
14 ActiveX events are basically a function call with the parameters passed
15 through an array of wxVariants along with a return value that is a wxVariant
16 itself. What type the parameters or return value are depends on the context
17 (i.e. what the .idl specifies).
18
19 Note that unlike the third party wxActiveX function names are not supported.
20
21 @onlyfor{wxmsw}
22
23 @library{wxbase}
24 @category{FIXME}
25 */
26 class wxActiveXEvent : public wxCommandEvent
27 {
28 public:
29 /**
30 Returns the dispatch id of this activex event. This is the numeric value from
31 the .idl file specified by the id().
32 */
33 DISPID GetDispatchId(int idx) const;
34
35 /**
36 Obtains the number of parameters passed through the activex event.
37 */
38 size_t ParamCount() const;
39
40 /**
41 Obtains the param name of the param number idx specifies as a string.
42 */
43 wxString ParamName(size_t idx) const;
44
45 /**
46 Obtains the param type of the param number idx specifies as a string.
47 */
48 wxString ParamType(size_t idx) const;
49
50 /**
51 Obtains the actual parameter value specified by idx.
52 */
53 wxVariant operator[](size_t idx);
54 };
55
56
57
58 /**
59 @class wxActiveXContainer
60
61 wxActiveXContainer is a host for an activex control on Windows (and
62 as such is a platform-specific class). Note that the HWND that the class
63 contains is the actual HWND of the activex control so using dynamic events
64 and connecting to wxEVT_SIZE, for example, will recieve the actual size
65 message sent to the control.
66
67 It is somewhat similar to the ATL class CAxWindow in operation.
68
69 The size of the activex control's content is generally gauranteed to be that
70 of the client size of the parent of this wxActiveXContainer.
71
72 You can also process activex events through wxEVT_ACTIVEX or the
73 corresponding message map macro EVT_ACTIVEX.
74
75 @onlyfor{wxmsw}
76
77 @library{wxbase}
78 @category{FIXME}
79
80 @see wxActiveXEvent
81 */
82 class wxActiveXContainer : public wxControl
83 {
84 public:
85 /**
86 Creates this activex container.
87
88 @param parent
89 parent of this control. Must not be @NULL.
90 @param iid
91 COM IID of pUnk to query. Must be a valid interface to an activex control.
92 @param pUnk
93 Interface of activex control.
94 */
95 wxActiveXContainer(wxWindow* parent, REFIID iid, IUnknown* pUnk);
96 };
97