DISP_PROPERTY_NOTIFY( theClass, pszExternalName, pfnGet, pfnSet, vtPropType, vtsParams )
#include <afxdisp.h>
Parameters
theClass
Name of the class.
pszExternalName
External name of the property.
pfnGet
Name of the member function used to get the property.
pfnSet
Name of the member function used to set the property.
vtPropType
A value specifying the property’s type.
vtsParams
A string of space-separated VTS_ variant parameter types, one for each parameter.
Remarks
This macro defines a property accessed with separate Get and Set member functions. Unlike the DISP_PROPERTY_EX macro, this macro allows you to specify a parameter list for the property. This is useful for implementing properties which are indexed or parameterized.
For example, consider the following declaration of get and set member functions that allow the user to request a specific row and column when accessing the property:
afx_msg short GetArray(short row, short column);
afx_msg short SetArray(short row, short column, short nNewValue);
These correspond to the following DISP_PROPERTY_PARAM macro in the control dispatch map:
DISP_PROPERTY_PARAM(CMyCtrl, "Array", GetArray, SetArray, VT-I2, VTS_I2 VTS_I2)
As another example, consider the following get and set member functions:
LPDISPATCH CMyObject::GetItem(short index1, short index2, short index3);
void CMyObject::SetItem(short index1, short index2, short index3, LPDISPATCH newValue);
These correspond to the following DISP_PROPERTY_PARAM macro in the control dispatch map:
DISP_PROPERTY_PARAM(CMyObject, "item", GetItem, SetItem, VT_DISPATCH, VTS_I2 VTS_I2 VTS_I2)
See Also Dispatch Maps, DISP_PROPERTY _EX