共用方式為


COleControlSite::SafeSetProperty

Sets the control property specified by dwDispID.

virtual BOOL AFX_CDECL SafeSetProperty( 
   DISPID dwDispID, 
   VARTYPE vtProp, 
   ...  
);

Parameters

  • dwDispID
    Identifies the dispatch ID of the property or method, found on the control's IDispatch interface, to be set.

  • vtProp
    Specifies the type of property to be set. For possible values, see the Remarks section for COleDispatchDriver::InvokeHelper.

  • ...
    A single parameter of the type specified by vtProp.

Return Value

Nonzero if successful; otherwise zero.

Remarks

Note

Unlike SetProperty and SetPropertyV, if an error is encountered (such as trying to set a nonexistent property), no exception is thrown.

Requirements

Header: afxocc.h

See Also

Reference

COleControlSite Class

Hierarchy Chart

COleControlSite::SetProperty