2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: msw/ole/activex.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxActiveXEvent
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxActiveXEvent
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-27 16:54:47 -04:00
|
|
|
An event class for handling activex events passed from wxActiveXContainer.
|
|
|
|
|
|
|
|
ActiveX events are basically a function call with the parameters passed
|
|
|
|
through an array of wxVariants along with a return value that is a wxVariant
|
|
|
|
itself. What type the parameters or return value are depends on the context
|
|
|
|
(i.e. what the .idl specifies).
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Note that unlike the third party wxActiveX function names are not supported.
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-27 16:54:47 -04:00
|
|
|
@onlyfor{wxmsw}
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
|
|
|
@category{FIXME}
|
|
|
|
*/
|
|
|
|
class wxActiveXEvent : public wxCommandEvent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Returns the dispatch id of this activex event. This is the numeric value from
|
|
|
|
the .idl file specified by the id().
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
DISPID GetDispatchId(int idx) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Obtains the number of parameters passed through the activex event.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
size_t ParamCount() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Obtains the param name of the param number idx specifies as a string.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxString ParamName(size_t idx) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Obtains the param type of the param number idx specifies as a string.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxString ParamType(size_t idx) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Obtains the actual parameter value specified by idx.
|
|
|
|
*/
|
|
|
|
wxVariant operator[](size_t idx);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxActiveXContainer
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
wxActiveXContainer is a host for an activex control on Windows (and
|
|
|
|
as such is a platform-specific class). Note that the HWND that the class
|
|
|
|
contains is the actual HWND of the activex control so using dynamic events
|
|
|
|
and connecting to wxEVT_SIZE, for example, will recieve the actual size
|
|
|
|
message sent to the control.
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
It is somewhat similar to the ATL class CAxWindow in operation.
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
The size of the activex control's content is generally gauranteed to be that
|
|
|
|
of the client size of the parent of this wxActiveXContainer.
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
You can also process activex events through wxEVT_ACTIVEX or the
|
|
|
|
corresponding message map macro EVT_ACTIVEX.
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-27 16:54:47 -04:00
|
|
|
@onlyfor{wxmsw}
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
|
|
|
@category{FIXME}
|
2008-03-09 08:33:59 -04:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
@see wxActiveXEvent
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxActiveXContainer : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Creates this activex container.
|
2008-03-27 16:54:47 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@param parent
|
|
|
|
parent of this control. Must not be @NULL.
|
|
|
|
@param iid
|
|
|
|
COM IID of pUnk to query. Must be a valid interface to an activex control.
|
|
|
|
@param pUnk
|
2008-03-27 16:54:47 -04:00
|
|
|
Interface of activex control.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxActiveXContainer(wxWindow* parent, REFIID iid, IUnknown* pUnk);
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|