Back to index

plt-scheme  4.2.1
Public Member Functions
CProxy_ITestControlEvents< T > Class Template Reference

#include <testobjectCP.h>

Inheritance diagram for CProxy_ITestControlEvents< T >:
Inheritance graph
[legend]
Collaboration diagram for CProxy_ITestControlEvents< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

HRESULT Fire_Click ()
HRESULT Fire_MouseDown (SHORT button, SHORT shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
HRESULT Fire_MouseUp (SHORT button, SHORT shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
HRESULT Fire_KeyDown (SHORT *keyCode, SHORT shift)
HRESULT Fire_KeyUp (SHORT *keyCode, SHORT shift)
HRESULT Fire_MouseMove (SHORT button, SHORT shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)

Detailed Description

template<class T>
class CProxy_ITestControlEvents< T >

Definition at line 10 of file testobjectCP.h.


Member Function Documentation

template<class T>
HRESULT CProxy_ITestControlEvents< T >::Fire_Click ( ) [inline]

Definition at line 14 of file testobjectCP.h.

       {
              CComVariant varResult;
              T* pT = static_cast<T*>(this);
              int nConnectionIndex;
              int nConnections = m_vec.GetSize();
              
              for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
              {
                     pT->Lock();
                     CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
                     pT->Unlock();
                     IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
                     if (pDispatch != NULL)
                     {
                            VariantClear(&varResult);
                            DISPPARAMS disp = { NULL, NULL, 0, 0 };
                            pDispatch->Invoke(DISPID_CLICK, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
                     }
              }
              return varResult.scode;
       
       }
template<class T>
HRESULT CProxy_ITestControlEvents< T >::Fire_KeyDown ( SHORT *  keyCode,
SHORT  shift 
) [inline]

Definition at line 95 of file testobjectCP.h.

       {
              CComVariant varResult;
              T* pT = static_cast<T*>(this);
              int nConnectionIndex;
              CComVariant* pvars = new CComVariant[2];
              int nConnections = m_vec.GetSize();
              
              for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
              {
                     pT->Lock();
                     CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
                     pT->Unlock();
                     IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
                     if (pDispatch != NULL)
                     {
                            VariantClear(&varResult);
                            pvars[1] = keyCode;
                            pvars[0] = shift;
                            DISPPARAMS disp = { pvars, NULL, 2, 0 };
                            pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
                     }
              }
              delete[] pvars;
              return varResult.scode;
       
       }
template<class T>
HRESULT CProxy_ITestControlEvents< T >::Fire_KeyUp ( SHORT *  keyCode,
SHORT  shift 
) [inline]

Definition at line 122 of file testobjectCP.h.

       {
              CComVariant varResult;
              T* pT = static_cast<T*>(this);
              int nConnectionIndex;
              CComVariant* pvars = new CComVariant[2];
              int nConnections = m_vec.GetSize();
              
              for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
              {
                     pT->Lock();
                     CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
                     pT->Unlock();
                     IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
                     if (pDispatch != NULL)
                     {
                            VariantClear(&varResult);
                            pvars[1] = keyCode;
                            pvars[0] = shift;
                            DISPPARAMS disp = { pvars, NULL, 2, 0 };
                            pDispatch->Invoke(0x2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
                     }
              }
              delete[] pvars;
              return varResult.scode;
       
       }
template<class T>
HRESULT CProxy_ITestControlEvents< T >::Fire_MouseDown ( SHORT  button,
SHORT  shift,
OLE_XPOS_PIXELS  x,
OLE_YPOS_PIXELS  y 
) [inline]

Definition at line 37 of file testobjectCP.h.

       {
              CComVariant varResult;
              T* pT = static_cast<T*>(this);
              int nConnectionIndex;
              CComVariant* pvars = new CComVariant[4];
              int nConnections = m_vec.GetSize();
              
              for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
              {
                     pT->Lock();
                     CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
                     pT->Unlock();
                     IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
                     if (pDispatch != NULL)
                     {
                            VariantClear(&varResult);
                            pvars[3] = button;
                            pvars[2] = shift;
                            pvars[1] = x;
                            pvars[0] = y;
                            DISPPARAMS disp = { pvars, NULL, 4, 0 };
                            pDispatch->Invoke(DISPID_MOUSEDOWN, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
                     }
              }
              delete[] pvars;
              return varResult.scode;
       
       }
template<class T>
HRESULT CProxy_ITestControlEvents< T >::Fire_MouseMove ( SHORT  button,
SHORT  shift,
OLE_XPOS_PIXELS  x,
OLE_YPOS_PIXELS  y 
) [inline]

Definition at line 149 of file testobjectCP.h.

       {
              CComVariant varResult;
              T* pT = static_cast<T*>(this);
              int nConnectionIndex;
              CComVariant* pvars = new CComVariant[4];
              int nConnections = m_vec.GetSize();
              
              for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
              {
                     pT->Lock();
                     CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
                     pT->Unlock();
                     IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
                     if (pDispatch != NULL)
                     {
                            VariantClear(&varResult);
                            pvars[3] = button;
                            pvars[2] = shift;
                            pvars[1] = x;
                            pvars[0] = y;
                            DISPPARAMS disp = { pvars, NULL, 4, 0 };
                            pDispatch->Invoke(0x3, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
                     }
              }
              delete[] pvars;
              return varResult.scode;
       
       }
template<class T>
HRESULT CProxy_ITestControlEvents< T >::Fire_MouseUp ( SHORT  button,
SHORT  shift,
OLE_XPOS_PIXELS  x,
OLE_YPOS_PIXELS  y 
) [inline]

Definition at line 66 of file testobjectCP.h.

       {
              CComVariant varResult;
              T* pT = static_cast<T*>(this);
              int nConnectionIndex;
              CComVariant* pvars = new CComVariant[4];
              int nConnections = m_vec.GetSize();
              
              for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
              {
                     pT->Lock();
                     CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
                     pT->Unlock();
                     IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
                     if (pDispatch != NULL)
                     {
                            VariantClear(&varResult);
                            pvars[3] = button;
                            pvars[2] = shift;
                            pvars[1] = x;
                            pvars[0] = y;
                            DISPPARAMS disp = { pvars, NULL, 4, 0 };
                            pDispatch->Invoke(DISPID_MOUSEUP, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
                     }
              }
              delete[] pvars;
              return varResult.scode;
       
       }

The documentation for this class was generated from the following file: