Dominic, TypeDefs? Is this the same as an Enum in the VB world? I have used Enums to establish a valid group
of values for a property in VB. So this isn't available in PowerBasic?
of values for a property in VB. So this isn't available in PowerBasic?
For example, given the following BASIC code
Code:
' Tree item shape %TIO_NOSHAPE = &H00000000 %TIO_ELLIPSE = &H00000001 %TIO_RECT = &H00000002 %TIO_ROUNDRECT = &H00000003 %TIO_CIRCLE = &H00000004 %TIO_DIAMOND = &H00000005 %TIO_TRIANGLE = &H00000006 %TIO_SHADOWED = &H00000800 METHOD SetShape(BYVAL Shape AS LONG, BYVAL cxBorder AS LONG, BYVAL BorderColor AS LONG) AS LONG ' Code to change node attributes END METHOD
This sample does not do this, but each constant can also be documented.
Also, the IDL snippets just shows the enumeration and the method.
Code:
typedef [uuid(BF0884DC-2A65-463E-86E1-174C0E6A85DA), v1_enum, helpstring("Tree control Node shape flags")] enum ShapeConstants { tscNoShape = 0x00000000, tscEllipse = 0x00000001, tscRect = 0x00000002, tscRoundRect = 0x00000003, tscCircle = 0x00000004, tscDiamond = 0x00000005, tscTriangle = 0x00000006, tscShadowed = 0x00000800 } ShapeConstants; [id(0x00000016), helpstring("Returns/sets the shape of a Node object.")] HRESULT SetShape([in] ShapeConstants Shape, [in] long cxBorder, [in] OLE_COLOR BorderColor);
Code:
[id(0x00000016)] HRESULT SetShape([in] long Shape, [in] long cxBorder, [in] long BorderColor);
Leave a comment: