COleControl::GetAmbientProperty BOOL GetAmbientProperty( DISPID dwDispid, VARTYPE vtProp, void* pvProp );Return ValueNonzero if the ambient property is supported; otherwise 0.ParametersdwDispidThe dispatch ID of the desired ambient property.vtPropA variant type tag that specifies the type of the value to be returned in pvProp.pvPropA 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* ResCall 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 Overview | Class Members | Hierarchy ChartSee Also COleControl::AmbientForeColor, COleControl::AmbientScaleUnits, COleControl::AmbientShowGrabHandles
BOOL GetAmbientProperty( DISPID dwDispid, VARTYPE vtProp, void* pvProp );Return ValueNonzero if the ambient property is supported; otherwise 0.ParametersdwDispidThe dispatch ID of the desired ambient property.vtPropA variant type tag that specifies the type of the value to be returned in pvProp.pvPropA 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*
ResCall 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 Overview | Class Members | Hierarchy ChartSee Also COleControl::AmbientForeColor, COleControl::AmbientScaleUnits, COleControl::AmbientShowGrabHandles
FinalConstruct中调用,可这时还没执行SetClientSite,我需要自己调用吗?还是其他什么方法?