COleControl::GetAmbientProperty

BOOL GetAmbientProperty( DISPID dwDispid, VARTYPE vtProp, void* pvProp );

Return Value

Nonzero if the ambient property is supported; otherwise 0.

Parameters

dwDispid

The dispatch ID of the desired ambient property.

vtProp

A variant type tag that specifies the type of the value to be returned in pvProp.

pvProp

A pointer to the address of the variable that will receive the property value or return value. The actual type of this pointer must match the type specified by vtProp.

vtProp Type of pvProp
VT_BOOL BOOL*
VT_BSTR CString*
VT_I2 short*
VT_I4 long*
VT_R4 float*
VT_R8 double*
VT_CY CY*
VT_COLOR OLE_COLOR*
VT_DISPATCH LPDISPATCH*
VT_FONT LPFONTDISP*

Remarks

Call this function to get the value of an ambient property of the container. If you use GetAmbientProperty to retrieve the ambient DisplayName and ScaleUnits properties, set vtProp to VT_BSTR and pvProp to CString*. If you are retrieving the ambient Font property, set vtProp to VT_FONT and pvProp to LPFONTDISP*.

Note that functions have already been provided for common ambient properties, such as AmbientBackColor and AmbientFont.

COleControl OverviewClass MembersHierarchy Chart

See Also   COleControl::AmbientForeColor, COleControl::AmbientScaleUnits, COleControl::AmbientShowGrabHandles