ActiveX Controls in MAXScript Rollouts

NOTE:

ActiveX Controls have been deprecated by Microsoft in the latest versions of the Windows operating system in favor of the DotNet framework and its controls.

While MAXScript still supports ActiveX controls, these have to be installed and registered on the system to be accessible to MAXScript.

As a replacement of ActiveX controls, MAXScript supports DotNet controls in 3ds Max 9 and higher.

Starting with 3ds Max 4, MAXScript lets the user embed ActiveX Controls in rollouts, thus expanding the number of available User Interface control types.

Examples include:

Simple controls

ActiveMovieControl Object,Calendar Control,Microsoft TreeView

Compound controls

Microsoft Excel,Microsoft Internet ExplorerAdobe Acrobat

This provides numerous possibilities in MAXScript which include:

The technology behind this feature is a MAXScript extension plug-in (MxsActiveX.dlx) making it MAXScript capable. It does not use ParamBlock2. The plug-in adds a new type of rollout control.

The syntax is:

activeXControl <name> [ <control_type> ] [	setupEvents:<boolean> ] [	releaseOnClose:<boolean>	] [	prop1:<value> ] [	prop2:<value> ] &ldots; 	 

Parameters:

<control_type>   

A string to create the control.

The string must be formatted in one of the following ways:

NOTE:

"MSHTML:" must precede the HTML fragment so that it is designated as being a MSHTML stream.

   

prop1:<value> 

   

prop2:<value> 

These are control specific keyword arguments. You can get a list of properties and their types by calling showProperties on the control.

   

setupEvents:<boolean> 

When set to true (default), event support for activeX controls will be enabled. When set to false , none of the event handlers will be called. This is useful when a control fires too many events but you are not interested in any.

   

releaseOnClose:<boolean> 

Every activeX control creates two hidden controls. Passing true here (default) will free them up and also any resources taken up by the control, and the activex properties cannot be accessed after the rollout has been closed. This is the case for window'ed controls like listview, treeview etc.

If you need to access the properties of the control after you close the rollout, then you need to pass false . This is helpful for windowless control like XML parser, FTP controls etc. See xmlio.ms for an example.

EXAMPLE

activeXControl ax "{05589FA1-C356-11CE-BF01-00AA0055595A}" \ height:200 width:300 align:#left

ActiveX Controls Topics:

ActiveX Control Properties

Active X Controls Methods

Active X Inspector Functions

Accessing ActiveX Controls Indexed Properties

ActiveX Controls Cursor Access

ActiveX Array Properties

ActiveX - Disable3ds Maxkeyboard accelerators

ActiveX COM Enums Represented as MAXScript Names

ActiveX by-reference arguments for methods and events

loadPicture for ActiveX Controls

updateWindow for ActiveX Controls

See Also