ActiveX Inspector Functions

The following Inspector Functions can be used to acquire lists of available ActiveX Controls and their methods, events, and properties:

showAllActiveXControls [ to:<stream> ]

Prints a list of ActiveX controls with their progID and classID, registered on your system.

showMethods <axControl> [ to:<stream> ] [showHidden:<false>]

Prints a list of methods and their arguments that can be invoked on the control

showEvents <axControl> [ to:<stream> ]

Prints a list of events and their arguments that are sent by the control

showProperties <axControl> [ to:<stream> ] [showHidden:<false>]

Prints a list of the properties and their types, supported by the control. Some properties are marked read-only

getPropNames <axControl> [showHidden:<false>]

Returns an array of the properties supported by the control

where

to:<stream>

is the output stringstream.

showHidden:<boolean>

controls whether hidden properties/methods should be included in the enumeration. The default value is false.

For example,

rollout test "Test"

(

activeXControl lv "MSComctlLib.ListViewCtrl"

on test open do

(

format "PROPERTIES:\n"

showProperties lv

format "METHODS:\n"

showMethods lv

format "EVENTS:\n"

showEvents lv

)

)

createDialog test

Result

Rollout:test

PROPERTIES:

.Arrange : ListArrangeConstants( #lvwNone | #lvwAutoLeft | #lvwAutoTop )

.ColumnHeaders : IColumnHeaders

.DropHighlight : IListItem

.DropHighlight : undefined, read-only

.HideColumnHeaders : boolean

.HideSelection : boolean

.Icons : IVBDataObject

.Icons : undefined, read-only

.ListItems : IListItems

.LabelEdit : ListLabelEditConstants( #lvwAutomatic | #lvwManual )

.LabelWrap : boolean

.MouseIcon : IPictureDisp

.MousePointer : MousePointerConstants( #ccDefault | #ccArrow | #ccCross | #ccIBeam | #ccIcon | #ccSize | #ccSizeNESW | #ccSizeNS | #ccSizeNWSE | #ccSizeEW | #ccUpArrow | #ccHourglass | #ccNoDrop | #ccArrowHourglass | #ccArrowQuestion | #ccSizeAll | #ccCustom )

.MultiSelect : boolean

.SelectedItem : IListItem

.SelectedItem : undefined, read-only

.SmallIcons : IVBDataObject

.SmallIcons : undefined, read-only

.Sorted : boolean

.SortKey : integer

.SortOrder : ListSortOrderConstants( #lvwAscending | #lvwDescending )

.View : ListViewConstants( #lvwIcon | #lvwSmallIcon | #lvwList | #lvwReport )

.OLEDragMode : OLEDragConstants( #ccOLEDragManual | #ccOLEDragAutomatic )

.OLEDropMode : OLEDropConstants( #ccOLEDropNone | #ccOLEDropManual )

.Appearance : AppearanceConstants( #ccFlat | #cc3D )

.BackColor : OLE_COLOR

.BorderStyle : BorderStyleConstants( #ccNone | #ccFixedSingle )

.Enabled : boolean

.Font : IFontDisp

.ForeColor : OLE_COLOR

.hWnd : OLE_HANDLE

.AllowColumnReorder : boolean

.Checkboxes : boolean

.FlatScrollBar : boolean

.FullRowSelect : boolean

.GridLines : boolean

.HotTracking : boolean

.HoverSelection : boolean

.Picture : IPictureDisp

.PictureAlignment : ListPictureAlignmentConstants( #lvwTopLeft | #lvwTopRight | #lvwBottomLeft | #lvwBottomRight | #lvwCenter | #lvwTile )

.ColumnHeaderIcons : IVBDataObject

.ColumnHeaderIcons : undefined, read-only

.TextBackground : ListTextBackgroundConstants( #lvwTransparent | #lvwOpaque )

METHODS:

.FindItem sz:string Where:undefined Index:undefined fPartial:undefined

.GetFirstVisible()

.HitTest x:float y:float

.StartLabelEdit()

.OLEDrag()

.Refresh()

EVENTS:

on <control_name> BeforeLabelEdit Cancel:integer do ( ... )

on <control_name> AfterLabelEdit Cancel:integer NewString:string do ( ... )

on <control_name> ColumnClick ColumnHeader:ColumnHeader do ( ... )

on <control_name> ItemClick Item:ListItem do ( ... )

on <control_name> KeyDown KeyCode:integer Shift:integer do ( ... )

on <control_name> KeyUp KeyCode:integer Shift:integer do ( ... )

on <control_name> KeyPress KeyAscii:integer do ( ... )

on <control_name> MouseDown Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

on <control_name> MouseMove Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

on <control_name> MouseUp Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

on <control_name> Click do ( ... )

on <control_name> DblClick do ( ... )

on <control_name> OLEStartDrag &Data:DataObject &AllowedEffects:integer do ( ... )

on <control_name> OLEGiveFeedback &Effect:integer &DefaultCursors:boolean do ( ... )

on <control_name> OLESetData &Data:DataObject &DataFormat:integer do ( ... )

on <control_name> OLECompleteDrag &Effect:integer do ( ... )

on <control_name> OLEDragOver &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float &State:integer do ( ... )

on <control_name> OLEDragDrop &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float do ( ... )

on <control_name> ItemCheck Item:ListItem do ( ... )

true

OK

 

Type Conversion

All supported COM datatypes are converted to an appropriate MAXScript wrapper when passed to and from a COM object. Here are the supported types and their mapping:

undefined - VT_EMPTY

boolean - VT_BOOL 

integer   - VT_UI1 

integer   - VT_UI2 

integer   - VT_UI4 

integer   - VT_UI8 

integer   - VT_I1 

integer   - VT_I2 

integer   - VT_I4 

integer   - VT_I8 

float  - VT_R4 

float   - VT_R8 

string   - VT_BSTR 

float   - VT_CY 

date   - VT_DATE 

error   - VT_ERROR

color   - VT_COLOR

MSDispatch - VT_DISPATCH

font - VT_FONT 

undefined - VT_UNKNOWN

ComArray - VT_SAFEARRAY

ComArray - VT_CARRAY

ComArray - VT_ARRAY

Valid string handling for property sets and method call arguments, you can safely do

ax.Navigate "http://beta.discreet.com"

where: ax is the Microsoft Web Browser Control

Note

Restricted functions like QueryInterface, AddRef, Release are displayed by showMethods() function.

 

See also

ActiveX Controls in MAXScript Rollouts