Sets the value of a property of a service component or ActiveX controlint sm_obj_set_property ( int obj_id, char *prop, char *val );
- An integer handle that identifies the object whose property you want to set. The handle is returned through
sm_obj_createfor service components,
sm_prop_idfor ActiveX controls.
- The designated property. Refer to the Description for information about available properties.
- The value to set for the specified property or property item. Panther converts the value to the type expected by the component.
For COM components, if the value needs to be sent as an object ID,
@obj()can be used to specify the object ID. For an example of its usage, see the example under
sm_obj_set_propertysets the value of the specified property of a service component or ActiveX control.
When setting properties for ActiveX controls, this function can be used on all platforms for CLSID and Control Name and only on Windows for properties of the ActiveX control itself.
Properties can be determined through the Axview utility for COM components, the Properties window for ActiveX controls, or the Component Interface window for service components.
In property specifications, periods are allowed. For example:sm_obj_set_property (Excel_Sheet,
For indexed properties, use brackets to specify the occurrence. For example:sm_obj_set_property (id, "prop", value)
id = sm_prop_id( "spinner" );
retcode = sm_obj_set_property ( id, "Value", "40" );