convert COM arguments to wx lazily to improve performance and allow calling Invoke/handling events involving parameters which can't be mapped to wx types at all (new GetNativeParameters() method can be used to access them) (closes #9606)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-25 12:25:43 +00:00
parent bb24f84b70
commit 2ddb8ccf60
3 changed files with 122 additions and 30 deletions

View File

@@ -22,6 +22,15 @@
ActiveX event.
@endEventTable
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 \b not valid however to manipulate
the same parameter using both approaches at the same time.
@onlyfor{wxmsw}
@library{wxcore}
@@ -55,6 +64,16 @@ public:
Obtains the actual parameter value specified by idx.
*/
wxVariant operator[](size_t idx);
/**
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.
\return a pointer to a struct containing the original MSW event parameters
*/
wxActiveXEventNativeMSW *GetNativeParameters() const;
};