Main Content

actxcontrol

(To be removed) CreateMicrosoft行为iveXcontrol in figure window

actxcontrolwill be removed in a future release. For more information, seeCompatibility Considerations.

Description

c= actxcontrol(progid)creates an ActiveX®control in a figure window. The programmatic identifier (progid) for the control determines the type of control created. For the value, see the documentation provided by the control vendor. The returned objectcis the default interface for the control.

You cannot use an ActiveX server for theprogidbecause MATLAB®cannot insert ActiveX servers in a figure. For information about using ActiveX servers, seeactxserver.

c= actxcontrol(progid,Name,Value)creates a control using name-value pair arguments.

Input Arguments

collapse all

Programmatic identifier, specified as a string or a character vector. Get the Programmatic identifier from the control or server vendor documentation.

Name-Value Arguments

Specify optional pairs of arguments asName1=Value1,...,NameN=ValueN, whereNameis the argument name andValueis the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

Example:actxcontrol('progid','position',[0 0 200 200],'parent',gcf)

MATLAB position vector specifying the position of the control in an integer vector, specified as the comma-separated pair consisting of'position'and an integer vector. The format is [left, bottom, width, height] using pixel units.

Parent figure, model, or Command Window, specified as the comma-separated pair consisting of'parent'and a handle. This functionality is not supported for figures created with theuifigurefunction.

Name of the event handler, specified as the comma-separated pair consisting of'callback'and a string or a character vector, or as a cell array of character vectors. To use the same handler for all events, specify a single name. To handle specific events, specify a cell array of event name/event handler pairs.

File name, specified as the comma-separated pair consisting of'filename'and a string or a character vector, containing the initial conditions of the previously saved control.

License key to create licensed ActiveX controls that require design-time licenses, specified as the comma-separated pair consisting of'licensekey'and a string or a character vector.

Limitations

  • COM functions are available on Microsoft®Windows®systems only.

Version History

Introduced before R2006a

expand all

Warns starting in R2019b

See Also