Version: 2.9.4
Public Member Functions
wxActiveXEvent Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/msw/ole/activex.h>

Inheritance diagram for wxActiveXEvent:

Detailed Description

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).

Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxActiveXEvent& event)

Event macros:

ActiveX event parameters can get extremely complex and may be beyond the abilities of wxVariant. If 'operator[]' fails, prints an error messages or crashes the application, event handlers should use GetNativeParameters() instead to obtain the original event information. Calls to operator[] and GetNativeParmeters() can be mixed. It is valid to handle some parameters of an event with operator[] and others directly through GetNativeParameters(). It is not valid however to manipulate the same parameter using both approaches at the same time.

Availability:  only available for the wxMSW port.

Library:  wxCore
Category:  Events

Public Member Functions

DISPID GetDispatchId (int idx) const
 Returns the dispatch id of this ActiveX event.
size_t ParamCount () const
 Obtains the number of parameters passed through the ActiveX event.
wxString ParamName (size_t idx) const
 Obtains the param name of the param number idx specifies as a string.
wxString ParamType (size_t idx) const
 Obtains the param type of the param number idx specifies as a string.
wxVariant operator[] (size_t idx)
 Obtains the actual parameter value specified by idx.
wxActiveXEventNativeMSW * GetNativeParameters () const
 Obtain the original MSW parameters for the event.

List of all members.


Member Function Documentation

DISPID wxActiveXEvent::GetDispatchId ( int  idx) const

Returns the dispatch id of this ActiveX event.

This is the numeric value from the .idl file specified by the id().

wxActiveXEventNativeMSW* wxActiveXEvent::GetNativeParameters ( ) const

Obtain the original MSW parameters for the event.

Event handlers can use this information to handle complex event parameters that are beyond the scope of wxVariant. The information returned here is the information passed to the original 'Invoke' method call.

Returns:
a pointer to a struct containing the original MSW event parameters
wxVariant wxActiveXEvent::operator[] ( size_t  idx)

Obtains the actual parameter value specified by idx.

size_t wxActiveXEvent::ParamCount ( ) const

Obtains the number of parameters passed through the ActiveX event.

wxString wxActiveXEvent::ParamName ( size_t  idx) const

Obtains the param name of the param number idx specifies as a string.

wxString wxActiveXEvent::ParamType ( size_t  idx) const

Obtains the param type of the param number idx specifies as a string.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines