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