Version History

Current version:	14

Last update:	August 25, 2004

Changes from Version 13 to Version 14

Changes from Version 12.1 to Version 13

Changes from Version 12 to Version 12.1

Changes from Version 11.5 to Version 12

Changes from Version 11 to Version 11.5

Version 11


Changes from Version 13 to Version 14

Version 14 of the LEADTOOLS Vector OCX has changed from Version 13 as follows:

The rest of this topic lists the new properties, methods and events in version 14:

EnableFontMapper property

FontMapper event

SubstitutedFont property


Changes from Version 12.1 to Version 13

Version 13 of the LEADTOOLS Vector OCX has changed from Version 12.1 as follows:

 The ILEADVectorObject has been updated by adding new methods and properties:

Description property

HyperlinkCount property

Object property

Tooltip property

TooltipPenStyle property

TooltipPenWidth property

TooltipPenColor property

TooltipBrushStyle property

TooltipBrushColor property

TooltipBrushHatch property

TooltipFontHeight property

TooltipFontUnderline property

TooltipFontItalic property

TooltipFontOrientation property

TooltipFontEscapement property

TooltipFontWidth property

TooltipFontFaceName property

TooltipFontPitchAndFamily property

TooltipFontQuality property

TooltipFontClipPrecision property

TooltipFontOutPrecision property

TooltipFontCharSet property

TooltipFontStrikeOut property

TooltipPointX property

TooltipPointY property

ViewContext property

ViewContextMinX property

ViewContextMinY property

ViewContextMinZ property

ViewContextMaxX property

ViewContextMaxY property

ViewContextMaxZ property

AddHyperlinkFile method

AddHyperlinkObject method

GetHyperlink method

SetHyperlinkFile method

SetHyperlinkObject method

 The following methods take an additional parameter:

ConvertToEMFHandle method

ConvertToWMFHandle method

ConvertToEMFPicture method

ConvertToWMFPicture method

The rest of this topic lists the new properties, methods and events in version 13

AntiAliasingDim Property

AntiAliasingFilter Property

AntiAliasingThreshold Property

ClipMode Property

EnableDlgHelpButton Property

EnableHelp property

Help Event

InvertColors method

RenderTextAsCurves Property


Changes from Version 12 to Version 12.1

Version 12.1 of the LEADTOOLS Vector OCX has changed from Version 12 as follows:

 The ExplodeObjects method now support a new flag that explodes objects into lines.

 Vector support can now be unlocked for viewing only. Please note that if vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, vector editing methods will return ERROR_VECTOR_LOCKED and some editing related properties will be read only.

 The Vector toolkit now supports faster loading for DWF, DWG, DXF and HPGL files.

 The Vector toolkit now supports more entities for DWG and DXF files.


Changes from Version 11.5 to Version 12

Version 12 of the LEADTOOLS Vector ActiveX has changed from version 11.5 as follows:

 Saving vector images as a DXF inside a TIFF file is now supported in LEADTOOLS Vector Imaging Pro.

 Supports copying and pasting into the Windows clipboard.

 Added new methods to add, edit and delete layers.

 Added new methods to provide a means for grouping objects into layers.

 Provides new methods for adding, editing and deleting objects.

 Now supports the following object types:

VECTOR_ARC

VECTOR_CHORD

VECTOR_CIRCLE

VECTOR_ELLIPSE

VECTOR_ELLIPTICALARC

VECTOR_LINE

VECTOR_PIE

VECTOR_POLYBEZIER

VECTOR_POLYDRAW

VECTOR_POLYGON

VECTOR_POLYLINE

VECTOR_RASTER

VECTOR_RECTANGLE

VECTOR_STOCK

VECTOR_TEXT

VECTOR_VERTEX

 Supports new common dialogs for adding/editing objects and layers.

 Supports Automation and Container functionality to make adding automated drawing easier.

 Supports vector groups for grouping vector objects.

Changed Interfaces

ILEADVectorObject (new properties and methods)

Changed or removed properties, methods and events:

The following properties, methods and events have been removed since version 11.5:

CameraDlgZoom property

CameraZoom property

Dlg3DOptionsAmbientLight property

Dlg3DOptionsPolygonMode property

Dlg3DOptionsUseLights property

ScaleHeight property

ScaleLeft property

ScaleMode property

ScaleTop property

ScaleWidth property

Show3DOptionsDlg method

The following properties, methods and events have changed since version 11.5:

All properties, methods and events that used float now use double.

AmbientLight property is now AmbientColor property.

CameraTheta property and CameraPhi property are now type double.

ConvertToEMFHandle method (takes four parameters)

ConvertToEMFPicture method (takes four parameters)

ConvertToWMFHandle method (takes four parameters)

ConvertToWMFPicture method (takes four parameters)

EnumObjects method (takes a parameter)

EnumVertices method (takes a parameter)

GetObjectRect method is now GetObjectsRect method.

GetObjectParallelogram method is now GetObjectsParallelogram method.

Reset method (takes a parameter)

Changed events:

VectorObjects event (takes a parameter)

New Interfaces:

ILEADVectorLayer

ILTVectorAutomation

ILTVectorContainer

ILEADVectorGroup

New Data Types

MarkerBrushHatchStyles

MarkerBrushStyles

MarkerPenStyles

VectorContainerObjectType

VectorObjectType

VectorPointType

VectorROPCode

New Error Codes

The following error codes have been added since version 11.5:

ERROR_VECTOR_BITMAP_NOT_FOUND

ERROR_VECTOR_BRUSH_NOT_FOUND

ERROR_VECTOR_CANT_ADD_TEXT

ERROR_VECTOR_CANT_READ_WMF

ERROR_VECTOR_CLIPBOARD

ERROR_VECTOR_CLIPBOARD_IS_EMPTY

ERROR_VECTOR_ENGINE_NOT_FOUND

ERROR_VECTOR_FONT_NOT_FOUND

ERROR_VECTOR_GROUP_NOT_FOUND

ERROR_VECTOR_GROUP_ALREADY_EXISTS

ERROR_VECTOR_INVALID_ENGINE

ERROR_VECTOR_INVALID_OBJECT_TYPE

ERROR_VECTOR_IS_EMPTY

ERROR_VECTOR_LAYER_ALREADY_EXISTS

ERROR_VECTOR_LAYER_IS_LOCKED

ERROR_VECTOR_LAYER_NOT_FOUND

ERROR_VECTOR_OBJECT_NOT_FOUND

ERROR_VECTOR_PEN_NOT_FOUND

ERROR_VECTOR_POINT_NOT_FOUND

The rest of this topic lists the new properties, methods and events in version 12.

AddGroup method

AddLayer method

AddNewObject method

AddUndoNode Method

AutoContainer Property

AutoCopy Method

AutoCut Method

AutoDelete Method

AutoEditObject Method

AutomationProps Property

AutoPaste Method

AutoPointX Property

AutoPointY Property

AutoPointZ Property

AutoRadius Property

AudoRender Method

AutoSelect Method

AutoStartAngle Property

AutoString Property

AutoStringHeight Property

AutoStringLeft Property

AutoStringTop Property

AutoStringWidth Property

AutoSweepAngle Property

CameraDistance property

CameraDlgDistance property

CameraDlgLookAtX property

CameraDlgLookAtY property

CameraDlgLookAtZ property

CameraDlgUsePerspective property

CameraLookAtX property

CameraLookAtY property

CameraLookAtZ property

CameraUsePerspective property

CanRedo Method

CanUndo Method

ClipboardReady method

CopyFlags property

CopyGroup method

CopyLayer method

Copy method

CopyObject method

DeleteObjects method

EditLayerDlgActiveLayer property

Empty method

EnableUndo Method

EnumGroups method

EnumLayers method

ExplodeObjects method

GetActiveLayer method

GetGroupByIndex method

GetGroupByName method

GetLayerByIndex method

GetLayerByName method

GroupCount property

HitTestDistance property

HitTestDlgDistance property

HitTestDlgFlags property

HitTestFlags property

IsAnObjectHidden method

IsEmpty method

IsObjectsInsideParallelogram method

IsObjectsInsideRect method

LayerCount property

LogicalX property

LogicalY property

LogicalZ property

Locked property

MarkerBrushColor property

MarkerBrushHatch property

MarkerBrushStyle property

MarkerPenColor property

MarkerPenStyle property

MarkerPenWidth property

NewGroupDlgName property

NewLayerDlgActiveLayer property

NewLayerDlgLocked property

NewLayerDlgName property

NewLayerDlgUserTag property

NewLayerDlgVisible property

OriginX property

OriginY property

OriginZ property

ParallelogramMaxX property

ParallelogramMaxY property

ParallelogramMaxZ property

ParallelogramMinX property

ParallelogramMinY property

ParallelogramMinZ property

Paste method

PhysicalToLogical method

PrintEnd method

PrintStart method

RedoMethod

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property

Render method

RotationDlgOriginX property

RotationDlgOriginY property

RotationDlgOriginZ property

ScaleDlgOriginX property

ScaleDlgOriginY property

ScaleDlgOriginZ property

ShowEditAllGroupsDlg method

ShowEditAllLayersDlg method

ShowEditGroupDlg method

ShowEditLayerDlg method

ShowEditObjectDlg method

ShowHitTestDlg method

ShowNewGroupDlg method

ShowNewLayerDlg method

ShowNewObjectDlg method

ShowRenderDlg method

ShowViewModeDlg method

ToolbarControl Property

Undo Method

UndoLevel Property

VectorContainer Event

VectorGroups event

VectorLayers event

VectorUserMode Property

ViewModeDlgViewMode property

ZoomRect method


Changes from Version 11 to Version 11.5

Version 11.5 of the LEADTOOLS Vector ActiveX has changed from version 11 as follows:

 The following new formats are supported:

FILE_DRW

FILE_CGM

FILE_PCT (Vector)

FILE_PLT

FILE_INTERGRAPH_VECTOR


Version 11

Version 11 is the first version of the LEADTOOLS Vector ActiveX.

 A Vector ActiveX has been added to support vector images.

The rest of this topic lists the new properties, methods and events.

Vector File Format Support

AmbientColor property (Vector Control)

Appearance property (Vector Control)

ApplyTransformation method (Vector Control)

ArraySize method (Vector Control)

AutoRepaint property (Vector Control)

AutoScroll property (Vector Control)

BackColor property (Vector Control)

BackErase property (Vector Control)

BorderStyle property (Vector Control)

CameraDlgPhi property (Vector Control)

CameraDlgTheta property (Vector Control)

CameraDlgZoom property (Vector Control)

CameraPhi property (Vector Control)

CameraTheta property (Vector Control)

CameraZoom property (Vector Control)

Click event (Vector Control)

ConvertFromEMFHandle method (Vector Control)

ConvertFromEMFPicture method (Vector Control)

ConvertFromWMFHandle method (Vector Control)

ConvertFromWMFPicture method (Vector Control)

ConvertToEMFHandle method (Vector Control)

ConvertToWMFHandle method (Vector Control)

ConvertToEMFPicture method (Vector Control)

ConvertToWMFPicture method (Vector Control)

CurrentObject property (Vector Control)

DblClick event (Vector Control)

DeleteObjects method (Vector Control)

Dlg3DOptionsAmbientColor property (Vector Control)

Dlg3DOptionsPolygonMode property (Vector Control)

Dlg3DOptionsUseLights property (Vector Control)

EnableMethodErrors property (Vector Control)

EnumObjects method (Vector Control)

EnumVertices method (Vector Control)

FeedLoad method (Vector Control)

ForceRepaint method (Vector Control)

Free method (Vector Control)

GetObjectsParallelogram method (Vector Control)

GetObjectsRect method (Vector Control)

HitTest method (Vector Control)

Is3D method (Vector Control)

IsAnObjectSelected method (Vector Control)

IsSupportLocked method (Vector Control)

KeyDown event (Vector Control)

KeyPress event (Vector Control)

KeyUp event (Vector Control)

Load method (Vector Control)

LoadArray method (Vector Control)

LoadMemory method (Vector Control)

LogicalToPhysical method (Vector Control)

MouseDown event (Vector Control)

MouseIcon property (Vector Control)

MouseMove event (Vector Control)

MousePointer property (Vector Control)

MouseUp event (Vector Control)

ObjectParallelogramLeftTopX property (Vector Control)

ObjectParallelogramLeftTopY property (Vector Control)

ObjectParallelogramLeftTopZ property (Vector Control)

ObjectParallelogramRightBottomX property (Vector Control)

ObjectParallelogramRightBottomY property (Vector Control)

ObjectParallelogramRightBottomZ property (Vector Control)

ObjectRectHeight property (Vector Control)

ObjectRectLeft property (Vector Control)

ObjectRectTop property (Vector Control)

ObjectRectWidth property (Vector Control)

PanX property (Vector Control)

PanY property (Vector Control)

PhysicalX property (Vector Control)

PhysicalY property (Vector Control)

PolygonMode property (Vector Control)

Realize method (Vector Control)

Reset method (Vector Control)

Resize event (Vector Control)

RotationDlgX property (Vector Control)

RotationDlgY property (Vector Control)

RotationDlgZ property (Vector Control)

RotationX property (Vector Control)

RotationY property (Vector Control)

RotationZ property (Vector Control)

Save method (Vector Control)

SaveArray method (Vector Control)

SaveMemory method (Vector Control)

ScaleDlgX property (Vector Control)

ScaleDlgY property (Vector Control)

ScaleDlgZ property (Vector Control)

ScaleHeight property (Vector Control)

ScaleLeft property (Vector Control)

ScaleMode property (Vector Control)

ScaleTop property (Vector Control)

ScaleWidth property (Vector Control)

ScalingX property (Vector Control)

ScalingY property (Vector Control)

ScalingZ property (Vector Control)

SelectAllObjects method (Vector Control)

SetRotation method (Vector Control)

SetScaling method (Vector Control)

SetTranslation method (Vector Control)

Show3DOptionsDlg method (Vector Control)

ShowCameraDlg method (Vector Control)

ShowRotateDlg method (Vector Control)

ShowScaleDlg method (Vector Control)

ShowTranslateDlg method (Vector Control)

StartFeedLoad method (Vector Control)

StopEnum property (Vector Control)

StopFeedLoad method (Vector Control)

TranslateDlgX property (Vector Control)

TranslateDlgY property (Vector Control)

TranslateDlgZ property (Vector Control)

TranslationX property (Vector Control)

TranslationY property (Vector Control)

TranslationZ property (Vector Control)

UnlockSupport method (Vector Control)

UseDoubleBuffer property (Vector Control)

UseLights property (Vector Control)

Vector property (Vector Control)

VertexBindMode property (Vector Control)

VectorEngine property (Vector Control)

VectorObjects event (Vector Control)

VectorVertices event (Vector Control)

ViewMode property (Vector Control)

ViewportHeight property (Vector Control)

ViewportLeft property (Vector Control)

ViewportTop property (Vector Control)

ViewportWidth property (Vector Control)


Syntax

This is the internal syntax of the property, method, or event. The external syntax depends on the development system you are using. Refer to the code example for your system, or for general information, refer to the following:

Visual Basic Syntax

Visual C++ 4.0 Syntax


Visual Basic Syntax

The syntax for the LEAD control's properties, methods, and events is the same as for other controls in Visual Basic.

Whenever you declare a variable as a data type, you need to know how the ActiveX data type is expressed in Visual Basic. Refer to the following table for the appropriate data type:

ActiveX Data Type	Visual Basic Data Type

boolean	Boolean

BSTR	String

IPictureDisp	Picture

long	Long

OLE_HANDLE	Integer on a 16-bit system; Long on a 32-bit system

OLE_COLOR	Long color value (such as the RGB return value)

OLE_XPOS_PIXELS	Long

OLE_YPOS_PIXELS	Long

short	Integer

float	Single


Visual C++ 4.0 Syntax

In Version 4.0 of Visual C++, the MicroSoft Foundation Class (MFC) library provides an ActiveX interface. This topic describes how to use the interface with the LEADTOOLS ActiveX.

Alternatively, to create an instance of the LEAD control at run time, use the Create function, which has the following prototype:

BOOL Create(	LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT&rect, CWnd* pParentWnd, UINT nID,
CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL);

Provide parameters as follows:

lpszWindowName	Use "", because the control window does not need a name.

dwStyle	Use 0 for the default style.

&rect	Use the CRect function. For example: CRect(0,0,50,50).

pParentWnd	Use this to refer to the current window.

nID	Use 0 for the default ID.

pPersist	Use NULL.

bStorage	Use FALSE.

bstrLicKey	Use the LEADTOOLS license string, which is always the first line in the LTOCX14.LIC file. For example: "LEADTOOLS OCX Copyright (c) 1990-2003 LEAD Technologies, Inc." If you do not specify this string correctly, the ActiveX will not work when you distribute your application.

For example, the following code comes from the EXAMPLES\OCX\MFC40\DEMO\MAINDEMO.CPP file:

static const WCHAR BASED_CODE _szLicString[] =
   L"LEADTOOLS OCX Copyright (c) 1990-2003 LEAD Technologies, Inc.";
     o
     o
     o
m_pLead = new CLead;
// pass the license string to the CLead::Create function.
// The CLead::Create expects a BSTR parameter and SysAllocString converts the
// WCHAR[] to a BSTR
BSTR lpLic = SysAllocString(_szLicString);
m_pLead->Create("", 0,CRect(0,0,50,50),this,0,NULL,FALSE,lpLic);
m_pLead->ShowWindow(SW_HIDE);
SysFreeString(lpLic);

When getting or setting a property value, you must use a function that is created by adding a prefix to the property name.

To set a property value, the syntax is as follows:

m_controlname.Setpropertyname(value);

For example:

m_Lead1.SetRubberBandVisible(FALSE);

To get a property value, the syntax is as follows:

value = m_controlname.Getpropertyname();

For example:

HeightFactor = m_Lead1.GetBitmapHeight();

To set a property array value, the syntax is as follows:

m_controlname.Setpropertyname(index, value);

For example:

m_Lead1.SetRemapTable(MyIndex, (255 * Offset) / CurrentRange);

To get a property array value, the syntax is as follows:

value = m_controlname.Getpropertyname(index);

For example:

m_Lead1.SetBitmap(m_Lead1.GetColorPlanes(3)); // Copy the K plane


Visual Basic Constants for Key Codes

Do the following to find the Visual Basic key codes:

1.	On the View pull-down menu, select Object Browser....

2.	Select VB - Visual Basic objects and procedures.

3.	Select VBKeyCodeConstants.

4.	Select one of the listed constants.

A description of the constant appears at the bottom of the form.


Visual C++ Key Codes

The following are the Visual C++ key codes:

VK_A through VK_Z are the same as their ASCII equivalents: 'A' thru 'Z'.
VK_0 through VK_9 are the same as their ASCII equivalents: '0' thru '9'.
VK_LBUTTON
VK_RBUTTON
VK_CANCEL
VK_MBUTTON
VK_BACK
VK_TAB
VK_CLEAR
VK_RETURN
VK_SHIFT
VK_CONTROL
VK_MENU
VK_PAUSE
VK_CAPITAL
VK_ESCAPE
VK_SPACE
VK_PRIOR
VK_NEXT
VK_END
VK_HOME
VK_LEFT
VK_UP
VK_RIGHT
VK_DOWN
VK_SELECT
VK_PRINT
VK_EXECUTE
VK_SNAPSHOT
VK_INSERT
VK_DELETE
VK_HELP

VK_NUMPAD0
VK_NUMPAD1
VK_NUMPAD2
VK_NUMPAD3
VK_NUMPAD4
VK_NUMPAD5
VK_NUMPAD6
VK_NUMPAD7
VK_NUMPAD8
VK_NUMPAD9
VK_MULTIPLY
VK_ADD
VK_SEPARATOR
VK_SUBTRACT
VK_DECIMAL
VK_DIVIDE
VK_F1
VK_F2
VK_F3
VK_F4
VK_F5
VK_F6
VK_F7
VK_F8
VK_F9
VK_F10
VK_F11
VK_F12
VK_F13
VK_F14
VK_F15
VK_F16
VK_F17
VK_F18
VK_F19
VK_F20
VK_F21
VK_F22
VK_F23
VK_F24
VK_NUMLOCK
VK_SCROLL


Formats of Vector Input Files

Vector Formats

FILE_CGM	[62] Computer Graphics Metafile    (For information on file format support, see Computer Graphics Metafile (CGM))

FILE_CMX	[261] Corel Presentation Exchange    (For information on file format support, see Corel Presentation Exchange (CMX))

FILE_DRW	[136] DRaWing – Micrografx Designer      (For information on file format support, see DraWing (DRW).)

FILE_DWF	[145] DWF – AutoCAD.  (For information on file format support, see DWF Format (DWF) ).

FILE_DWG	[124] DWG - AutoCAD.  (For information on file format support, see DWG Format (DWG) ).

FILE_DXF	[58] AutoCad. (For information on file format support see Drawing Interchange Format (DXF)).

FILE_DXF_R12	This is the same as FILE_DXF.

FILE_DXF_R13	[290] AutoCad (Release 13). (For information on file format support, see Drawing Interchange Format (DXF)).

FILE_EMF	[116] Windows Enhanced Meta File. (For information on file format support, see Windows Metafile Formats(WMF and EMF))

FILE_GERBER	[169] Gerber File. (For more information on the file format support, see Gerber Format (GBR).

FILE_INTERGRAPH_VECTOR	[123] Intergraph MicroStation and Interactive Graphics Design. (For information on file format support, see DGN(DGN))

FILE_PCL	[251] Printer Command Language – Hewlett Packard. (For information on file format support, see Printer Command Language (PCL).)

FILE_PCT	[56] Macintosh QuickDraw    (For information on file format support see Macintosh Pict Format (PCT))

FILE_PLT	[137] HPGL – Hewlett-Packard    (For information on file format support, see PLT(PLT))

FILE_SHP	[255] ESRI Shape – Environmental System Research Institute. (For information on file format support, see ESRI Shape Format (SHP).)

FILE_SVG	[247] Scalable Vector Graphics. (For information on file format support, see Scalable Vector Graphics Format (SVG).)

FILE_TIF_DXF	[140] Tagged Image File with a vector image saved as a DXF. (For information on file format support see Drawing Interchange Format (DXF)).

FILE_WMF	[15] Windows Meta File. (For information on file format support, see Windows Metafile Formats(WMF and EMF))

For a complete list of files supported by LEADTOOLS, refer to Summary of All Supported File Formats.


Formats of Vector Output Files

The following are valid values to specify the format of an output file. For more general descriptions of file formats, refer to Summary of All Supported Image File Formats.

FILE_CGM	[62] Computer Graphics Metafile. Bits per pixel: 24    (For information on file format support, see Computer Graphics Metafile (CGM))

FILE_DRW	[136] DRaWing – Micrografx Designer. Bits per pixel: 24 (For information on file format support, see DraWing (DRW)

FILE_DWF	[145] DWF-AutoCAD.  For more information on file format support, see DWF Format(DWF).

FILE_DXF	[58] AutoCad. Bits per pixel: 8. (For information on file format support, see Drawing Interchange Format (DXF))

FILE_DXF_R12	This is the same as FILE_DXF.

FILE_DXF_R13	[290] AutoCad (Release 13). Bits per pixel: 8. (For information on file format support, see Drawing Interchange Format (DXF)).

FILE_EMF	[116] Windows Enhanced Meta File. Bits per pixel:8, 24. (For information on file format support, see Windows Metafile Formats(WMF and EMF))

FILE_GERBER	[169] Gerber. Bits per pixel: 24. (For more information on the file format support, see Gerber Format (GBR).

FILE_PCL	[251] Printer Command Language – Hewlett Packard. Bits per pixel: 24.

FILE_PCT	[56] Macintosh QuickDraw. Bits per pixel: 24.    (For information on file format support, see Macintosh Pict Format (PCT)

FILE_PLT	[137] HPGL – Hewlett-Packard. Bits per pixel: 4.    (For information on file format support, see PLT (PLT))

FILE_SHP	[255] ESRI Shape – Environmental System Research Institute. (For information on file format support, see ESRI Shape Format (SHP).). Bits per pixel: 24.

FILE_SVG	[247] Scalable Vector Graphics. Bits per pixel: 24. (For information on file format support, see Scalable Vector Graphics Format (SVG).)

FILE_SVG_EMBED_IMAGES	[289] Scalable Vector Graphics Format (SVG). Bits per pixel: 24. When saving SVG files using FILE_SVG_EMBED_IMAGES, the images are embedded inside the SVG file. The file in this case becomes larger, but is more portable. It can be moved itself, without worrying about also moving external images. (For more information on the file format support, see Scalable Vector Graphics Format (SVG)).

FILE_TIF_DXF	[140] Tagged Image File with a vector image saved as a DXF. Bits per pixel: 8.    (For information on file format support, see Drawing Interchange Format (DXF))

FILE_WMF	[15] Windows Meta File. Bits per pixel: 8, 24. (For information on file format support, see Windows Metafile Formats(WMF and EMF))


Summary of All Supported Image File Formats

Color and Grayscale

Computer Graphics Metafile (CGM)

Corel Presentation Exhange (CMX)

DGN (DGN)

DRaWing (DRW)

Drawing Interchange Format (DXF)

DWF Format (DWF)

DWG Format (DWG)

ESRI Shape (SHP) Format

Gerber Format (GBR)

Macintosh Pict Format (PCT)

PLT (PLT)

Printer Command Language Format (PCL)

Scalable Vector Graphics Format (SVG)

Windows Metafile Formats (WMF and EMF)

WordPerfect Format (WPG)


File Formats: Corel Presentation Exchange (CMX)
Corel Presentation Exchange Format (CMX)

The Corel Presentation Exchange file format is the presentation format of the CorelSuite applications. It is a recording of the display primitives of an application to a display interface. The CMX format supports Intel and Motorola binary formats.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support, which reads the files as raster images, for this file format may be added to non-vector toolkits by purchasing the Vector View plug in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: CMX.

This file format is supported by CorelDraw.

LEAD supports versions 5, 6, 7, and 8 of this format.

This file format does support layers. LEAD supports most LEAD objects, but LEAD does not support RImage.

File constants associated with this file format are:

FILE_CMX

Required DLL: LFCMX14N.DLL. This format also requires LVKRN14N.DLL.

For CMX files, you can read the following bits per pixel: 24.


File Formats: Computer Graphics Metafile (CGM)
Computer Graphics Metafile (CGM)

Computer Graphics Metafile is a format used for the exchange of vector and bitmap data. This file format is supported by Photoshop, Autovue and Corel. LEADTOOLS supports versions 1, 2, 3 and 4 of CGM, as well as the Binary data-encoding format of CGM.

The following objects can be loaded: POLYLINE (Class 4 ID 1), DISJOINT POLYLINE (Class 4 ID 2), TEXT (Class 4 ID 4), RESTRICTED TEXT (Class 4 ID 5), POLYGON (Class 4 ID 7), POLYGON SET (Class 4 ID 8), RECTANGLE (Class 4 ID 11), CIRCLE (Class 4 ID 12), CIRCULAR ARC CENTER (Class 4 ID 15), CIRCULAR ARC CENTER CLOSE (Class 4 ID 16), ELLIPSE (Class 4 ID 17), ELLIPSE ARC (Class 4 ID 18), ELLIPSE ARC CLOSE (Class 4 ID 19), and POLYBEZIER (Class 4 ID 26).

The following objects can be saved: POLYLINE (Class 4 ID 1), TEXT (Class 4 ID 4), POLYGON (Class 4 ID 7), RECTANGLE (Class 4 ID 11), and ELLIPSE (Class 4 ID 17).

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support for this file format may be added to non-vector toolkits by purchasing a file format plug-in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this file format is: CGM.

This file format does not support layers.

The file constants associated with this file format are:

FILE_CGM

Required DLL: LFCGM14N.DLL. This format also requires LVKRN14N.DLL.

For CGM files, you can read and write (Vector toolkits only) the following bits per pixel: 24.

9. In the Corel Presentation Exchange Format (CMX) topic make the following changes:

The Corel Presentation Exchange file format is the presentation format of the CorelSuite applications. It is a recording of the display primitives of an application to a display interface. The CMX format supports Intel and Motorola binary formats.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support, which reads the files as raster images, for this file format may be added to non-vector toolkits by purchasing the Vector View plug in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: CMX.

This file format is supported by CorelDraw.

LEAD supports versions 5, 6, 7, and 8 of this format.

This file format does support layers. LEAD does not support RImage.

LEAD can load the following objects: BeginLayer 11, BeginPage 9, BeginParagraph 99, BeginProcedure 17, BeginTextGroup 72, BeginTextObject 70, BeginTextStream 20, CharInfo 101, Characters 102, DrawImage 69, DrawChars 65, Ellipse 66, EndEmbedded 23, EndGroup 14, EndLayer 12, EndPage 10, EndParagraph 100, EndSection 18, EndTextGroup 73, EndTextObject 71, EndTextStream 21, JumpAbsolute 111, PolyCurve 67, Rectangle 68, SetCharStyle 85, SimpleWideText 86, and TextFrame 98.

File constants associated with this file format are:

FILE_CMX

Required DLL: LFCMX14N.DLL. This format also requires LVKRN14N.DLL.

For CMX files, you can read the following bits per pixel: 24.


File Formats: DGN (DGN)
DGN (DGN)

DGN (also RDL) is a file format common to Intergraph's MicroStation and Interactive Graphics Design System (IGDS) CAD applications running on Intergraph workstations and PCs.

This file format is not supported in the non-vector toolkits. Read support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. Read support for this file format may be added to non-vector toolkits by purchasing a file format plug-in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEADTOOLS supports DGN versions 1, 2 and 3.

LEAD can load the following objects: Line (Type 3), Polyline (Type 4), Polyline (Type 6), Polyline (Type 11), Polyline (Type 21), Ellipse (Type 15), Arc (Type 16), and Text (Type 17).

The file constants associated with this file format are:

FILE_INTERGRAPH_VECTOR

Required DLL: LFDGN14N.DLL. This format also requires LVKRN14N.DLL.

For DGN files, you can read the following bits per pixel: 24.


File Formats: DRaWing (DRW)
DRaWing (DRW)

DRW()DRaWing) is a native format used in the popular Micrografx Designer CAD/CAM/CAE application for the Windows operating system.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support for this file format may be added to non-vector toolkits by purchasing a file format plug-in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEADTOOLS supports versions 1, 2, 3, 4 and 5 of the DRW file format.

LEAD can load the following objects: Elliptical arc (Symbol 0), Closed, fillable polygon (Symbol 1), Collection of objects (Symbol 2), Circle, ellipse (Symbol 3), Line of scalable text (Symbol 5), Single line segment (Symbol 6), Open, unfillable simple polygon (Symbol 8), Pie wedge (Symbol 9), Rectangle, square (Symbol 10), Rectangle with rounded corners (Symbol 11), Closed, fillable elliptical arc (Symbol 13), Clockwise elliptical arc (Symbol 14), Closed, fillable parabola (Symbol 15), Closed, fillable quadric spline (Symbol 16), Closed, fillable complex objects (Symbol 17), Parabola (Symbol 18), Quadric spline (Symbol 19), Open, unfillable complex polygon (Symbol 20), Monochrome bitmap (Symbol 22), Open, unfillable poly bezier (Symbol 23), Closed, fillable poly bezier (Symbol 24), Rich text block (Symbol 25), Virtual bitmap (Symbol 26), Closed, single instance clip path (Symbol 27), Closed, tiled-instance clip path (Symbol 28), and Formatted text along a curve (Symbol 29).

LEAD can save the following objects: Elliptical arc (Symbol 0), Closed, fillable polygon (Symbol 1), Circle, ellipse (Symbol 3), Line of scalable text (Symbol 5), Single line segment (Symbol 6), Open, unfillable simple polygon (Symbol 8), Pie wedge (Symbol 9), Rectangle, square (Symbol 10), and Closed, fillable elliptical arc (Symbol 13).

The file constants associated with this file format are:

FILE_DRW

Required DLL: LFDRW14N.DLL. This format also requires LVKRN14N.DLL.

DRW files, you can read and write (Vector toolkits only) the following bits per pixel: 24.


File Formats: DWF Format (DWF)
DWF Format (DWF)

DWF is a binary file format used by AutoDesk AutoCAD for storing DWG files on the World Wide Web. DWF is a 2D, vector-based description of drawings and illustrations.

LEADTOOLS supports DWF versions .4, .5, .55 and .6, and can load the following objects: Background ("Background"), Layer ("Layer"), Polyline ("P"), Polygon ("P"), Polytriangle ("T"), Filled Ellipse ("E"), Outline Ellipse ("E"), and Text ("X").

LEAD can save the following objects: Background ("Background"), Layer ("Layer"), Polyline ("P"), Polygon ("P"), Polytriangle ("T"), Filled Ellipse ("E"), and Outline Ellipse ("E").

LEADTOOLS also supports text and embedded raster objects.

This file format is not supported in the non-vector toolkits. Read and write support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection.

The file constants associated with this file format are:

FILE_DWF

Required DLL: LFDWF14N.DLL. This format also requires LVKRN14N.DLL.

For DWF files, you can read the following bits per pixel: 24.

For DWF files, you can write the following bits per pixel: 8.


File Formats: DWG Format (DWG)
DWG Format (DWG)

DWG is a binary file format used by AutoDesk AutoCAD. It can contain 2D or 3D objects and offers compression and a CRC check for internal data.

LEADTOOLS supports DWG 13, 14 and 15 files and can load the following objects: LAYER, BLOCK, TEXT, MTEXT, VERTEX 2D, VERTEX 3D, VERTEX MESH, VERTEX PFACE, VERTEX PFACE FACE, POLYLINE 2D, POLYLINE 3D, POLYLINE PFACE, POLYLINE MESH, INSERT, MINSERT, ARC, CIRCLE, LINE, POINT, 3DFACE, SOLID, TRACE, ELLIPSE, LWPOLYLINE, SPLINE, LEADER, DIMENSION ORDINATE, DIMENSION LINEAR, DIMENSION ALIGNED, DIMENSION ANG 3PT, DIMENSION ANG 2LN, DIMENSION RADIUS, DIMENSION DIAMETER, ATTRIB, ATTDEF, REGION, 3DSOLID, BODY.

LEADTOOLS currently does not load the following objects: ACAD_PROXY_ENTITY, HATCH, MLINE, OLEFRAME, OLE2FRAME, RAY, SHAPE, VIEWPORT, and XLINE.

This file format is not supported in the non-vector toolkits. Read support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. Read support for this file format may be added to non-vector toolkits by purchasing a file format plug-in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: DWG.

LEAD supports the object types listed above, as well as, layers and the grouping of objects. Embedded raster objects are not supported.

File constants associated with this file format are:

FILE_DWG

Required DLL: LFDWG14N.DLL. This format also requires LVKRN14N.DLL.

For DWG files, you can read the following bits per pixel: 24.


File Formats: Drawing Interchange Format (DXF)
Drawing Interchange Format (DXF)

DXF (Drawing Interchange Format) was first introduced by AutoDesk AutoCAD, and is one of the most widely used CAD/CAM/CAE applications in the world. DXF is very popular and is supported by most 3D formats on PC platforms.

A DXF file is an ASCII file containing 2D and 3D components representing a drawing. Those components are known as Entities. The DXF file can represent almost any CAD drawing using those entities, and can connect a group of entities together (such as windows, doors, etc.) and use them later in the file. The DXF file has seen many changes through the years, from version 2.6 to the latest release version 14. However, the latest release of AutoCAD still manages to open files created with any of the earlier versions.

LEADTOOLS supports all current variations of the DXF format (versions 2.6, 9, 10, 11, 12, 13, 14) and loads the following objects: LAYER, BLOCK, LINE, 3DFACE, TRACE, SOLID, ARC, CIRCLE, ELLIPSE, POINT, LWPOLYLINE, POLYLINE, SPLINE, INSERT, TEXT, MTEXT, DIMENSION, LEADER, TOLERANCE, ATTRIB, ATTDEF, 3DSOLID, VERTEX, and IMAGE.

LEADTOOLS can save the following objects: POINT, LINE, SOLID, 3DFACE, POLYLINE, VERTEX, ELLIPSE, CIRCLE, ARC, TEXT, BLOCK, INSERT, and IMAGE.

LEADTOOLS currently does not support the following objects: ACAD_PROXY_ENTITY, BODY, HATCH, MLINE, OLEFRAME, OLE2FRAME, RAY, REGION, SHAPE, VIEWPORT, and XLINE. You can load any of the DXF files as either vector images or raster images. Users can load a DXF file, and save it to any of file formats supported by LEADTOOLS.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support for this file format may be added to non-vector toolkits by purchasing a file format plug-in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEADTOOLS also supports the ability to save a vector image as a DXF within a TIFF.

The file constants associated with this file format are:

FILE_DXF

FILE_DXF_R12 (This is the same as FILE_DXF).

FILE_DXF_R14

FILE_TIF_DXF

Required DLL: LFDXF14N.DLL. This format also requires LVKRN14N.DLL.

For DXF files, you can read and write (Vector toolkits only) the following bits per pixel: 8.


File Formats: ESRI Shape (SHP)
ESRI Shape Format (SHP)

The ESRI Shape format is a vector format created by the Environmental System Research Institute. The SHP file can support point, multi-point, polygon, polyline and multi-patches. This file format has a much faster drawing speed and more editing capabilities than other data sources. It is supported by the ARC Explorer 2.0 and ARCView.

This file format contains three files:

Main file: *.shp

Index file: *.shx

DBase file: *.dbf

This file format is not supported in the non-vector toolkits. Read support, which reads the files as raster images, for this format may be added to non-vector toolkits by purchasing the Vector View plug in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: SHP.

This file format does not support layers, grouping objects or embedded raster objects.

LEAD can load the following objects: PolyLine, Point, Polygon, Multi Point, and Multi patch.

LEAD can save the following objects: Line, Polyline, Rect, Polygon, Ellipse, Circle, Arc, Elliptical arc, Pie, Chord, Text, Polydraw, and Polybezier.

File constants associated with this file format are:

FILE_SHP

Required DLL: LFSHP14N.DLL. This format also requires LVKRN14N.DLL.

For SHP files, you can read and write the following bits per pixel: 24.


File Formats: Gerber Format (GBR)
Gerber Format (GBR)

The Gerber file format is a vector – based format used by GerbTools, ViewMate and CamTastic as a simple way of transferring printed circuit board information to a wide variety of devices. The Extended Gerber Format (RS-274X) handles information for defining shapes and sizes of lines and other features. This format supports Polygons, Circles, Ovals, Outlines, Arcs, Lines, Rectangles, Moire and Thermal.

This file format is not supported in the non-vector toolkits. Read and write support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. Read support, which reads the files as raster images, for this file format may be added to non-vector toolkits by purchasing the Vector View plug-in. For more information on available LEADTOOLS products, refer to Topic Selection.

The default extension used by this format is: GBR.

This file format does support layers.

LEAD can load the following objects: AD, AM and G commands, Circle, Line (vector, center, LowerLeft), Rectangle, Oval, Thermal, Polygon, Moire, and Arc.

LEAD can save the following objects: VERTEX, LINE, RECTANGLE, POLYLINE, POLYGON, ELLIPSE, CIRCLE, ARC, PIE, CHORD, POLYBEZIER, TEXT, POLYDRAW, and ELLIPTICALARC.

File constants associated with this file format are:

FILE_GERBER

Required DLL: LFGBR14N.DLL. This format also requires LVKRN14N.DLL.

For Gerber files, you can read the following bits per pixel: 24.

For Gerber files, you can write the following bits per pixel: 24.


File Formats: Printer Command Language (PCL)
Printer Command Language Format (PCL)

The Printer Command Language vector format was developed by Hewlett-Packard, specifically to provide a means of communication between computers and printers. The PCL files contain the commands and the HP printers parse and decode those commands. This format also includes HPGL. For more information about HPGL, refer to PLT.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support, which reads the files as raster images, for this file format may be added to non-vector toolkits by purchasing the Vector View plug in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEAD supports version 3.0 and 5.0 of this file format.

The default extensions used by this format are: PRN, PRT and PCL.

This format is used by Visual PCL, PCLTOOLS, redtitan EscapE and AutoVue.

This file format does not support layers or grouping, but it does support embedded raster objects.

LEAD can load the following objects:

For PCL:

Raster Support (RLE, TIFF, DeltaRow, Adaptive, UnEncoded), Text support, Rectangle support.

For HPGL: IN, DF, PG, SP, PU, PD, PA, PR, LT, AA, AR, CI, EA, ER, EW, RA, RR, WG, FT, LB, CP, DT, SI, SR, SC, IP, BR, BZ, PE, IR, and TR.

LEAD can save the following objects:

For PCL: Vertex, Line, Rectangle, Polyline, Polybezier, Polygon, Ellipse, Circle, Arc, Text, EllipticalArc, Pie, Chord, Polydraw, and Raster

For: HPGL: IN, PU, PA, RA, PD, CI, AA, WG, SP, LT, and FT.

PCL filter supports many features such as:

Support for Macros.

Enhance the performance of the filter.

File constants associated with this file format are:

FILE_PCL

Required DLL: LFPCL14N.DLL. This format also requires LVKRN14N.DLL.

For PCL files, you can read the following bits per pixel: 24.

For PCL files, you can write the following bits per pixel: 24.


File Formats: Macintosh Pict Format (PCT)
Macintosh Pict Format (PCT)

Macintosh Pict (PCT) files are produced using Macintosh QuickDraw, and are used in desktop publishing and imaging applications.

PCT Vector files can be read and written as raster images in the non-vector toolkits. LEADTOOLS supports multiple page files when reading and writing PCT images as raster images. Vector read/write support for these formats is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

File constants associated with this file format are:

FILE_PCT

Required DLL: LFPCT14N.DLL

For PCT files, you can read and write the following bits per pixel: 1, 4, 8, 16, 24.

For PCT (Vector) files, you can read and write (Vector toolkits only) the following bits per pixel: 24.


File Formats: PLT (PLT)
PLT (PLT)

PLT (also HPGL) is the standard language for printing line drawings created by Hewlett-Packard. HPGL is supported by many CAD programs, charting programs and word processors.

LEADTOOLS supports HPGL and HPGL/2.

LEAD can load the following objects: IN, DF, PG, SP, PU, PD, PA, PR, LT, AA, AR, CI, EA, ER, EW, RA, RR, WG, FT, LB, CP, DT, SI, SR, SC, IP, BR, BZ, PE, IR, and TR.

LEAD can save the following objects: IN, PU, PA, RA, PD, CI, AA, WG, SP, LT, and FT.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support for this file format may be added to non-vector toolkits by purchasing a file format plug-in.  For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The file constants associated with this file format are:

FILE_PLT

Required DLL: LFPCL14N.DLL. This format also requires LVKRN14N.DLL.

For HPGL files, you can read the following bits per pixel: 4.

For HPGL/2 files, you can read and write (Vector toolkits only) the following bits per pixel: 4.


File Formats: Scalable Vector Graphics (SVG)
Scalable Vector Graphics Format (SVG)

The Scalable Vector Graphics file format is an Internet standard vector format for describing two-dimensional graphics in XML. SVG supports vector graphic shapes, images, and text.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. Read support, which reads the files as raster images, for this file format may be added to non-vector toolkits by purchasing the Vector View plug in. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: SVG.

This file format is supported by Adobe SVG Viewer, CorelDraw! 10.0, JASC WebDraw and Apache Batik SVG browser.

This file format does not support layers, but it will save embedded raster objects.

LEAD can load the following objects: Group, Rectangle, Circle, Ellipse, Line, Polyline, Polygon, Path (Poly Draw, Pie, Chord, Elliptical arc, Arc), Text, and Image.

LEAD can save the following objects: Circle, Line, Rectangle, Polyline, Polygon, polybezier, Ellipse, Circle, Path (Poly Draw, Pie, Chord, Elliptical arc, Arc), Text, and Image.

When saving SVG files, the images are stored externally and a reference to the image(s) is added to the file.

File constants associated with this file format are:

FILE_SVG

FILE_SVG_EMBED_IMAGES

Required DLL: LFSVG14N.DLL. This format also requires LVKRN14N.DLL.

For SVG files, you can read the following bits per pixel: 24.

For SVG files, you can write the following bits per pixel: 24.


File Formats: Windows Metafile Format (WMF)
Windows Metafile Formats (WMF and EMF)

The Windows Metafile (WMF and EMF) formats are vector formats that may or may not also contain a raster image.

EMF/WMF Vector files can be read and written as raster images in the non-vector toolkits. Vector read/write support for these formats is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEAD can load the following objects: EMR_CREATEPALETTE, EMR_POLYBEZIER, EMR_POLYLINE, EMR_POLYBEZIERTO, EMR_POLYLINETO, EMR_POLYBEZIER16, EMR_POLYLINE16, EMR_POLYBEZIERTO16, EMR_POLYLINETO16, EMR_POLYGON, EMR_POLYGON16, EMR_POLYPOLYLINE, EMR_POLYPOLYLINE16, EMR_POLYPOLYGON, EMR_POLYPOLYGON16, EMR_SETPIXELV, EMR_LINETO, EMR_ANGLEARC, EMR_ELLIPSE, EMR_RECTANGLE, EMR_ROUNDRECT, EMR_ARC, EMR_CHORD, EMR_PIE, EMR_ARCTO, EMR_POLYDRAW, EMR_POLYDRAW16, EMR_EXTTEXTOUTA, EMR_EXTTEXTOUTW, EMR_POLYTEXTOUTA, EMR_POLYTEXTOUTW, EMR_BITBLT, EMR_STRETCHBLT, EMR_SETDIBITSTODEVICE, EMR_STRETCHDIBITS, EMR_MODIFYWORLDTRANSFORM, EMR_SETWORLDTRANSFORM, EMR_BEGINPATH, EMR_ENDPATH, EMR_SELECTCLIPPATH, EMR_FILLPATH, EMR_STROKEANDFILLPATH, EMR_STROKEPATH, and EMR_SELECTCLIPPATH.

LEAD can save the following objects: EMR_CREATEPALETTE, EMR_POLYBEZIER, EMR_POLYLINE, EMR_POLYBEZIERTO, EMR_POLYLINETO, EMR_POLYBEZIER16, EMR_POLYLINE16, EMR_POLYBEZIERTO16, EMR_POLYLINETO16, EMR_POLYGON, EMR_POLYGON16, EMR_POLYPOLYLINE, EMR_POLYPOLYLINE16, EMR_POLYPOLYGON, EMR_POLYPOLYGON16, EMR_SETPIXELV, EMR_LINETO, EMR_ANGLEARC, EMR_ELLIPSE, EMR_RECTANGLE, EMR_ROUNDRECT, EMR_ARC, EMR_CHORD, EMR_PIE, EMR_ARCTO, EMR_POLYDRAW, EMR_POLYDRAW16, EMR_EXTTEXTOUTA, EMR_EXTTEXTOUTW, EMR_POLYTEXTOUTA, EMR_POLYTEXTOUTW, EMR_BITBLT, EMR_STRETCHBLT, EMR_SETDIBITSTODEVICE, EMR_STRETCHDIBITS, EMR_MODIFYWORLDTRANSFORM, EMR_SETWORLDTRANSFORM, EMR_BEGINPATH, EMR_ENDPATH, EMR_SELECTCLIPPATH, EMR_FILLPATH, EMR_STROKEANDFILLPATH, EMR_STROKEPATH, and EMR_SELECTCLIPPATH.

File constants associated with this file format are:

FILE_EMF

FILE_WMF

Required DLL: LFWMF14N.DLL. This format also requires LVKRN14N.DLL.

For WMF and EMF files, you can read and write the following bits per pixel: 8, 24.

Note:	When working with LEADTOOLS annotations (rather than image files), you can save the annotations as WMF or EMF files containing vector graphics that can be used in other applications.


File Formats: WordPerfect Graphics Format (WPG and VWPG)
WordPerfect Graphics Format (WPG and VWPG)

The WordPerfect (WPG) format can contain vectored or raster images. LEADTOOLS handles both the raster images and the vector images.

Raster Images

For WPG files, you can read and write the following bits per pixel: 1, 4, 8.

Vector Images

VWPG (Vector Word Perfect Graphics) is a vector format created by COREL. There are two versions (version1 and version2) of the VWPG file format. Each has its own format and specifications. LEAD supports only version2 of this format. This file format is supported by COREL DRAW 8.0.

The default extension used by this format is: WPG.

This file format does support layers and embedded raster objects, but not grouping.

LEAD can load the following objects: Poly Curve, Rect, Vertical Line, Horizontal Line, Poly Line, Text, and Image.

LEAD can save the following objects: Line, Polyline, Rect, Polygon, Ellipse, Circle, Arc, Elliptical arc, Pie, Chord, Text, Polydraw, Polybezier, and Image.

File constants associated with this file format are:

FILE_VWPG

Required DLL: LFVPG14N.DLL. This format also requires LVKRN14N.DLL.

For VWPG files, you can read and write the following bits per pixel: 24.


Vector Files To Be Included With Your Application

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation.  The following subdirectory is created:

REDIST\	Redistributable files, including vector features files.

Note: The Vector features are provided for evaluation purposes only. You may not copy or redistribute any of the following files without obtaining the proper license.  In some cases, the license is included with your initial purchase of LEADTOOLS.  In other cases, you must obtain a license from a third party or enter into a royalty agreement with LEAD to obtain the proper license.  For these special licensing situations, see the notes below accompanying the specific file.

The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS Vector features functions on a WIN32 system. (\REDIST\ subdirectory contains copies of these files.)

Please note that LTKRN, LTDIS, LTEFX, LTIMG, and LTFIL are required for ALL OCX applications. For more information on LTKRN, LTDIS, LTEFX, LTIMG, LTFIL or any other files for the Main OCX, refer to Files To Be Included With Your Application.

Redistributables:	Explanation:	If you are using a standard release, the files to use are:	If you are using an evaluation release, the files to use are:
LTVEC	Vector Control.	DLL: LTKRN14N.DLL LVKRN14N.DLL LTDIS14N.DLL LTFIL14N.DLL LTIMG14N.DLL LVDLG14N.DLL LTDLGCLR14N.DLL LTDLGCOM14N.DLL LTDLGCTRL14N.DLL LTDLGFILE14N.DLL LTDLGKRN14N.DLL LTDLGUTL14N.DLL OCX: LTVEC14N.OCX	DLL: LTKRN14E.DLL LVKRN14E.DLL LTDIS14E.DLL LTFIL14E.DLL LTIMG14E.DLL LVDLG14E.DLL LTDLGCLR14E.DLL LTDLGCOM14E.DLL LTDLGCTRL14E.DLL LTDLGFILE14E.DLL LTDLGKRN14E.DLL LTDLGUTL14E.DLL OCX: LTVEC14E.OCX


Example Programs

Note:	You can run some of the example programs on your system by clicking the appropriate buttons in online help. An error message will appear if you try to run an example program that is not on your system, or if you try to run a Delphi example without Delphi on your system.

The executable files for these examples were compiled with Document/Medical capabilities To get Document/Medical capabilities, you must buy a LEADTOOLS Document/Medical toolkit.  To get Vector capabilities, you must buy one of the toolkits which includes the Vector features.

Visual C++ 4.0

 EXAMPLES\OCX\MFC40\VECTOR contains a sample application that demonstrates most of the Vector capabilities in the Visual C++ 4.0 environment. You can open the project in Visual C++; then compile and run it.
Click here [image] to run the WIN32 version of this example.

Visual Basic

 EXAMPLES\OCX\VB\VECTOR contains a sample application that demonstrates most of the Vector capabilities in the Visual Basic 5.0 environment. To run the 32-bit sample application, you can run the EXE file in LEAD's BIN directory.
Click here [image] to run the WIN32 version of this example.


Visual Basic Only

LEADTOOLS methods that reference picture objects were developed for Visual Basic. Picture objects in other development systems have not worked in tests and do not appear to be compatible.


Dialog Strings

The following strings can be accessed and modified using GetDlgString method and SetDlgString method.

 Generic control strings

Value	String

VECTOR_DLGSTRING_BUTTON_OK	"OK"

VECTOR_DLGSTRING_BUTTON_CANCEL	"Cancel"

VECTOR_DLGSTRING_BUTTON_HELP	"Help"

VECTOR_DLGSTRING_CHECK_PREVIEW	"Preview"

 Transform dialog

Value	String

VECTOR_DLGSTRING_TRANSFORM_SCALE_CAPTION	"Scale"

VECTOR_DLGSTRING_TRANSFORM_ROTATE_CAPTION	"Rotate"

VECTOR_DLGSTRING_TRANSFORM_TRANSLATE_CAPTION	"Translate"

VECTOR_DLGSTRING_TRANSFORM_CAMERA_CAPTION	"Camera"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_XUP	"+ X"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_XDOWN	"- X"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_YUP	"+ Y"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_YDOWN	"- Y"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_ZUP	"+ Z"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_ZDOWN	"- Z"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_XUPCAMERA	"+ Theta"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_XDOWNCAMERA	"- Theta"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_YUPCAMERA	"+ Phi"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_YDOWNCAMERA	"- Phi"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_ZUPCAMERA	"+ Distance"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_ZDOWNCAMERA	"- Distance"

VECTOR_DLGSTRING_TRANSFORM_CHECK_ALL	"All"

VECTOR_DLGSTRING_TRANSFORM_CHECK_PERSPECTIVE	"Perspective"

VECTOR_DLGSTRING_TRANSFORM_BUTTON_RESET	"Reset"

 Render dialog

Value	String

VECTOR_DLGSTRING_RENDER_CAPTION	"Render Options"

VECTOR_DLGSTRING_RENDER_FRAME_LIGHTS	"Lights"

VECTOR_DLGSTRING_RENDER_CHECK_USELIGHTS	"Use lights"

VECTOR_DLGSTRING_RENDER_BUTTON_AMBIENT	"Ambient Color"

VECTOR_DLGSTRING_RENDER_FRAME_POLYGONMODE	"Polygon Mode"

VECTOR_DLGSTRING_RENDER_RADIO_POINT	"Points"

VECTOR_DLGSTRING_RENDER_RADIO_LINE	"Lines"

VECTOR_DLGSTRING_RENDER_RADIO_FILL	"Filled"

 View mode dialog

Value	String

VECTOR_DLGSTRING_VIEWMODE_CAPTION	"View Mode Options"

VECTOR_DLGSTRING_VIEWMODE_FRAME_VIEWMODE	"View Mode"

VECTOR_DLGSTRING_VIEWMODE_RADIO_FIT	"Fit"

VECTOR_DLGSTRING_VIEWMODE_RADIO_SNAP	"Snap"

 Hit test dialog

Value	String

VECTOR_DLGSTRING_HITTEST_CAPTION	"Hit Test Options"

VECTOR_DLGSTRING_HITTEST_FRAME_DISTANCE	"Distance"

VECTOR_DLGSTRING_HITTEST_FRAME_OPTIONS	"Options"

VECTOR_DLGSTRING_HITTEST_CHECK_CLOSEDFIGURES	"Closed figures"

VECTOR_DLGSTRING_HITTEST_CHECK_IGNORESELECTED	"Ignore selected"

 All layers dialog

Value	String

VECTOR_DLGSTRING_ALLLAYERS_CAPTION	"Layers"

VECTOR_DLGSTRING_ALLLAYERS_BUTTON_NEW	"New"

VECTOR_DLGSTRING_ALLLAYERS_BUTTON_EDIT	"Edit"

VECTOR_DLGSTRING_ALLLAYERS_BUTTON_DELETE	"Delete"

VECTOR_DLGSTRING_ALLLAYERS_YES	"Yes"

VECTOR_DLGSTRING_ALLLAYERS_NO	"No"

VECTOR_DLGSTRING_ALLLAYERS_NAME	"Name"

VECTOR_DLGSTRING_ALLLAYERS_ACTIVE	"Active"

VECTOR_DLGSTRING_ALLLAYERS_VISIBLE	"Visible"

VECTOR_DLGSTRING_ALLLAYERS_LOCKED	"Locked"

 Layer dialog

Value	String

VECTOR_DLGSTRING_LAYER_CAPTION	"Layer"

VECTOR_DLGSTRING_LAYER_FRAME_NAME	"Name"

VECTOR_DLGSTRING_LAYER_CHECK_ACTIVE	"Current Active Layer"

VECTOR_DLGSTRING_LAYER_CHECK_VISIBLE	"Visible"

VECTOR_DLGSTRING_LAYER_CHECK_LOCKED	"Locked"

 General dialog

Value	String

VECTOR_DLGSTRING_GENERAL_CAPTION	"General"

VECTOR_DLGSTRING_GENERAL_FRAME_SELECTION	"Selection"

VECTOR_DLGSTRING_GENERAL_CHECK_SELECTION	"Selected"

VECTOR_DLGSTRING_GENERAL_FRAME_RASTEROPERATION	"Raster Operation"

 ROP2

Value	String

VECTOR_DLGSTRING_GENERAL_ROP2_BLACKNESS	"Blackness"

VECTOR_DLGSTRING_GENERAL_ROP2_NOTMERGEPEN	"Not Merge Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_MASKNOTPEN	"Mask Not Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_NOTCOPYPEN	"Not Copy Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_MASKPENNOT	"Mask Pen Not"

VECTOR_DLGSTRING_GENERAL_ROP2_INVERT	"Invert"

VECTOR_DLGSTRING_GENERAL_ROP2_XORPEN	"Xor Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_NOTMASK	"Not Mask"

VECTOR_DLGSTRING_GENERAL_ROP2_MASKPEN	"Mask Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_NOTXORPEN	"Not Xor Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_NOP	"Nop"

VECTOR_DLGSTRING_GENERAL_ROP2_MERGENOTPEN	"Merge Not Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_COPYPEN	"Copy Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_MERGEPENNOT	"Merge Pen Not"

VECTOR_DLGSTRING_GENERAL_ROP2_MERGEPEN	"Merge Pen"

VECTOR_DLGSTRING_GENERAL_ROP2_WHITENESS	"Whiteness"

 Pen dialog

Value	String

VECTOR_DLGSTRING_PEN_CAPTION	"Pen"

VECTOR_DLGSTRING_PEN_FRAME_STYLE	"Style"

VECTOR_DLGSTRING_PEN_FRAME_WIDTH	"Width"

VECTOR_DLGSTRING_PEN_FRAME_COLOR	"Color"

 Pen styles

Value	String

VECTOR_DLGSTRING_PEN_STYLE_SOLID	"Solid"

VECTOR_DLGSTRING_PEN_STYLE_DASH	"Dash"

VECTOR_DLGSTRING_PEN_STYLE_DOT	"Dot"

VECTOR_DLGSTRING_PEN_STYLE_DASHDOT	"Dash-Dot"

VECTOR_DLGSTRING_PEN_STYLE_DASHDOTDOT	"Dast-Dot-Dot"

VECTOR_DLGSTRING_PEN_STYLE_TRANSPARENT	"Transparent"

VECTOR_DLGSTRING_PEN_STYLE_INSIDEFRAME	"Inside Frame"

 Brush dialog

Value	String

VECTOR_DLGSTRING_BRUSH_CAPTION	"Brush"

VECTOR_DLGSTRING_BRUSH_FRAME_STYLE	"Style"

VECTOR_DLGSTRING_BRUSH_FRAME_HATCH	"Hatch"

VECTOR_DLGSTRING_BRUSH_FRAME_COLOR	"Color"

 Brush styles

Value	String

VECTOR_DLGSTRING_BRUSH_STYLE_SOLID	"Solid"

VECTOR_DLGSTRING_BRUSH_STYLE_TRANSPARENT	"Transparent"

VECTOR_DLGSTRING_BRUSH_STYLE_HATCHED	"Hatched"

 Brush hatched

Value	String

VECTOR_DLGSTRING_BRUSH_HATCHED_HORIZONTAL	"Horizontal"

VECTOR_DLGSTRING_BRUSH_HATCHED_VERTICAL	"Vertical"

VECTOR_DLGSTRING_BRUSH_HATCHED_FORWARDDIAGONAL	"Forward Diagonal"

VECTOR_DLGSTRING_BRUSH_HATCHED_BACKWARDDIAGONAL	"Backward Diagonal"

VECTOR_DLGSTRING_BRUSH_HATCHED_CROSS	"Cross"

VECTOR_DLGSTRING_BRUSH_HATCHED_DIAGONALCROSS	"Diagonal Cross"

 Vertex dialog

Value	String

VECTOR_DLGSTRING_VERTEX_CAPTION	"Vertex"

VECTOR_DLGSTRING_VERTEX_FRAME_LOCATION	"Location"

 Line dialog

Value	String

VECTOR_DLGSTRING_LINE_CAPTION	"Line"

VECTOR_DLGSTRING_LINE_FRAME_STARTPOINT	"Start Point"

VECTOR_DLGSTRING_LINE_FRAME_ENDPOINT	"End Point"

 Rectangle dialog

Value	String

VECTOR_DLGSTRING_RECTANGLE_CAPTION	"Rectangle"

VECTOR_DLGSTRING_RECTANGLE_FRAME_STARTPOINT	"Start Point"

VECTOR_DLGSTRING_RECTANGLE_FRAME_ENDPOINT	"End Point"

 Polyline dialog

Value	String

VECTOR_DLGSTRING_POLYLINE_CAPTION	"Poly Line"

VECTOR_DLGSTRING_POLYLINE_FRAME_POINTS	"Point"

VECTOR_DLGSTRING_POLYLINE_BUTTON_NEW	"New"

VECTOR_DLGSTRING_POLYLINE_BUTTON_DELETE	"Delete"

 Polybezier dialog

Value	String

VECTOR_DLGSTRING_POLYBEZIER_CAPTION	"Poly Bezier"

VECTOR_DLGSTRING_POLYBEZIER_FRAME_POINTS	"Points"

VECTOR_DLGSTRING_POLYBEZIER_BUTTON_NEW	"New"

VECTOR_DLGSTRING_POLYBEZIER_BUTTON_DELETE	"Delete"

 Polygon dialog

Value	String

VECTOR_DLGSTRING_POLYGON_CAPTION	"Polygon"

VECTOR_DLGSTRING_POLYGON_FRAME_POINTS	"Points"

VECTOR_DLGSTRING_POLYGON_BUTTON_NEW	"New"

VECTOR_DLGSTRING_POLYGON_BUTTON_DELETE	"Delete"

VECTOR_DLGSTRING_POLYGON_FRAME_FILLMODE	"Fill Mode"

VECTOR_DLGSTRING_POLYGON_RADIO_ALTERNATE	"Alternate"

VECTOR_DLGSTRING_POLYGON_RADIO_WINDING	"Winding"

 Ellipse dialog

Value	String

VECTOR_DLGSTRING_ELLIPSE_CAPTION	"Ellipse"

VECTOR_DLGSTRING_ELLIPSE_FRAME_CENTER	"Center"

VECTOR_DLGSTRING_ELLIPSE_FRAME_RADIUS	"Radius"

 Circle dialog

Value	String

VECTOR_DLGSTRING_CIRCLE_CAPTION	"Circle"

VECTOR_DLGSTRING_CIRCLE_FRAME_CENTER	"Center"

VECTOR_DLGSTRING_CIRCLE_FRAME_RADIUS	"Radius"

 Arc dialog

Value	String

VECTOR_DLGSTRING_ARC_CAPTION	"Arc"

VECTOR_DLGSTRING_ARC_FRAME_CENTER	"Center"

VECTOR_DLGSTRING_ARC_FRAME_RADIUS	"Radius"

VECTOR_DLGSTRING_ARC_FRAME_ANGLES	"Angles"

VECTOR_DLGSTRING_ARC_STATIC_START	"Start"

VECTOR_DLGSTRING_ARC_STATIC_SWEEP	"Sweep"

 Text dialog

Value	String

VECTOR_DLGSTRING_TEXT_CAPTION	"Text"

VECTOR_DLGSTRING_TEXT_FRAME_POINT	"Point"

VECTOR_DLGSTRING_TEXT_FRAME_HORIZONTAL	"Horizontal"

VECTOR_DLGSTRING_TEXT_FRAME_VERTICAL	"Vertical"

VECTOR_DLGSTRING_TEXT_CHECK_HITTESTRECTANGLE	"Hit Test Rectangle"

VECTOR_DLGSTRING_TEXT_FRAME_TEXT	"Text"

VECTOR_DLGSTRING_TEXT_FRAME_FONT	"Font"

VECTOR_DLGSTRING_TEXT_BUTTON_FONT	"Font..."

VECTOR_DLGSTRING_TEXT_STATIC_CHARWIDTH	"Char Width"

VECTOR_DLGSTRING_TEXT_STATIC_CHARHEIGHT	"Char Height"

 Text alignment combo

Value	String

VECTOR_DLGSTRING_TEXT_LEFT	"Left"

VECTOR_DLGSTRING_TEXT_RIGHT	"Right"

VECTOR_DLGSTRING_TEXT_HCENTER	"Center"

VECTOR_DLGSTRING_TEXT_TOP	"Top"

VECTOR_DLGSTRING_TEXT_BOTTOM	"Bottom"

VECTOR_DLGSTRING_TEXT_VCENTER	"Center"

 Pie dialog

Value	String

VECTOR_DLGSTRING_PIE_CAPTION	"Pie"

VECTOR_DLGSTRING_CHORD_CAPTION	"Chord"

VECTOR_DLGSTRING_PIE_FRAME_CENTER	"Center"

VECTOR_DLGSTRING_PIE_FRAME_RADIUS	"Radius"

VECTOR_DLGSTRING_PIE_FRAME_ANGLES	"Angles"

VECTOR_DLGSTRING_PIE_STATIC_START	"Start"

VECTOR_DLGSTRING_PIE_STATIC_SWEEP	"Sweep"

 Polydraw dialog

Value	String

VECTOR_DLGSTRING_POLYDRAW_CAPTION	"Poly Draw"

VECTOR_DLGSTRING_POLYDRAW_FRAME_POINTS	"Points"

VECTOR_DLGSTRING_POLYDRAW_BUTTON_NEW	"New"

VECTOR_DLGSTRING_POLYDRAW_BUTTON_DELETE	"Delete"

VECTOR_DLGSTRING_POLYDRAW_FRAME_TYPE	"Type"

VECTOR_DLGSTRING_POLYDRAW_CHECK_CLOSEFIGURE	"Close Figure"

 Polydraw types

Value	String

VECTOR_DLGSTRING_POLYDRAW_MOVETO	"Move To"

VECTOR_DLGSTRING_POLYDRAW_LINETO	"Line To"

VECTOR_DLGSTRING_POLYDRAW_BEZIERTO	"Bezier To"

 Raster dialog

Value	String

VECTOR_DLGSTRING_RASTER_CAPTION	"Raster"

VECTOR_DLGSTRING_RASTER_FRAME_POINT1	"Point 1"

VECTOR_DLGSTRING_RASTER_FRAME_POINT2	"Point 2"

VECTOR_DLGSTRING_RASTER_FRAME_BITMAP	"Bitmap"

 Messages

Value	String

VECTOR_DLGSTRING_VECTOR_IS_LOCKED	"Vector is locked!"

VECTOR_DLGSTRING_VECTOR_NOT_ENABLED	"Vector is not enabled!"

VECTOR_DLGSTRING_LAYER_NOT_FOUND	"Layer not found!"

VECTOR_DLGSTRING_LAYER_ALREADY_EXISTS	"Layer already exists!"

VECTOR_DLGSTRING_NO_MEMORY	"Out of memory!"

VECTOR_DLGSTRING_DELETELAYERQUERY	"This will delete all objects inside layer:\n%s\n\nAre you sure you want to continue?"

VECTOR_DLGSTRING_CANNOTFINISHOPERATION	"Cannot finish this operation"

VECTOR_DLGSTRING_CANNOTLOADBITMAP	"Cannot load bitmap!"


Limitations When Printing to Vector File Formats

When printing from your application to a vector file format, only certain types of objects can be put into each of the various vector files.

For example, suppose your application is printing a page, which looks like this:

When printing to a CGM file, which supports text and shape objects, but does not support raster objects, the output will appear like this:

See the table below for a list of which objects are supported for each format.

Format	Raster	Shapes	Text	Notes
VEC	Supported	Supported	Supported
DWF	Not supported	Supported	Supported	Filling is not supported, - format restriction.
DXF	Supported	Supported	Supported	Filling is not supported, - format restriction.
CGM	Not supported	Supported	Supported	No raster, format - restriction
PLT	Not supported	Supported	Supported	No colors, no filling - format restriction.
PCT	Not supported	Supported	Supported	Elliptical arcs not supported.
DRW	Not supported	Supported	Supported	Elliptical arcs not supported.
WMF	Supported	Supported	Supported
EMF	Supported	Supported	Supported
GBR	Not supported	Supported	Supported	Two colors only, - format restriction
SHP	Not supported	Supported	Supported	No raster - format restriction
PRN	Supported	Supported	Supported	No colors, no filling - format restriction.
SVG	Supported	Supported	Supported
WPG	Supported	Supported	Supported


Tutorial for Visual C++ 4.0 Programmers

The following topics provide brief and simple examples to help you learn how to use the LEADTOOLS Vector features ActiveX.

Note:	These tutorial examples are intended to be easy to understand and easy to test. The example programs in the EXAMPLES subdirectory provide more in depth design and more detailed code.

General Tutorials

Creating an Empty Vector (Visual C++ 4.0 and later)

Vector Load and Save (Visual C++ 4.0 and later)

Transformation (Visual C++ 4.0 and later)

Using the Camera (Visual C++ 4.0 and later)

Using Vector Engines (Visual C++ 4.0 and later)

Implementing Hit Testing (Visual C++ 4.0 and later)

Working with layers (Visual C++ 4.0 and later)

Adding and Displaying Vector Objects (Visual C++ 4.0 and later)

Automation Tutorials

Implementing Vector Automation (Visual C++ 4.0 and later)

Adding The Automation Container (Visual C++ 4.0 and later)

Setting Vector Automation Properties (Visual C++ 4.0 and later)

The Undo/Redo Capabilities (Visual C++ 4.0 and later)


Creating an Empty Vector (Visual C++ 4.0 and later)

Take the following steps to start a project and to add some code that displays a vector on the main form:

1.	Start a new project as follows:

For C++ 4.x, run Microsoft Developer Studio for Visual C++, select the File >New menu option, select Project Workspace, and click the OK button. In the New Project Workspace dialog box, do the following:

a.	In the Type list box, select MFC AppWizard (exe).

b.	In the Name text box, specify tutor.

c.	In the Location text box, specify the path of the project.

d.	In the Platforms list box, check Win32.

e.	Click the Create button.

For C++ 5.0, run Microsoft Visual C++ 5.0, select the File >New menu option, and do the following:

a.	Click the Projects tab.

b.	Select MFC AppWizard (exe) as the project type

c.	In the Project name text box, specify tutor.

d.	In the Location text box, specify the path of the project.

e.	Click the OK button.

2.	In the Step 1 dialog box, do the following:

a.	Select Dialog based.

b.	Click the Next button.

3.	In the Step 2 of 4 dialog box, do the following:

a.	Ensure that About Box is selected.

b.	Ensure that 3D Controls is selected.

c.	Select OLE Controls (ActiveX Controls in 5.0).

d.	Click the Next button.

4.	In the Step 3 of 4 dialog box, do the following:

a.	For comments, ensure that Yes, Please is selected.

b.	For how to use the MFC library, select As a statically linked library.

c.	Click the Next button.

5.	In the Step 4 of 4 dialog box, just click Finish.

6.	Read New Project Information, and click OK. (The AppWizard creates the project files and opens the project.)

7.	Add the LTVECOCX.H  and L_OCXERR.H files, which define LEAD constants, to your project as follows:

a.	Copy the \lead\include\ltvecocx.h, ltlck_.h, and l_ocxerr.h files to your project directory.

b.	In the Project Workspace, click the FileView tab.

c.	Double-click the tutor files folder to open it.

d.	Double-click the Dependencies folder (the Header Files folder in 5.0) to open it.

e.	Double-click the StdAfx.h file to edit it.

f.	Add the following lines to the end of the file:

#include "LTVECOCX.H"
#include "L_OCXERR.H"

8.	Add a LEAD Vector control to the main window as follows:

For C++ 4.x:

a.	In the Project Workspace, click the ResourceView tab.

b.	Double-click the tutor resources folder to open it.

c.	Double-click the Dialog folder to open it.

d.	Double-click IDD_TUTOR_DIALOG to design the dialog box.

e.	Select the TODO... text control; then press the Delete key to delete it.

f.	From the main menu, select Insert > Component. (The Component Gallery appears.)

g.	Click the OLE Controls tab.

h.	Double-click the LEAD Vector Control (14.0) icon. (The Confirm Classes dialog box appears.)

i.	Ensure that CLEADVector, CLTVectorContainer, CLEADVectorLayer, COleFont, CLTVectorAutomation, CLEADVectorObject, and CPicture are checked.

j.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD Vector control appears in the Controls toolbar.)

k.	 Click the LEAD Vector control icon; then size and position the control as you want it to appear at run time.

l.	Double-click the new LEAD Vector control to edit its properties.

m.	Change the ID to IDC_LEADVECTOR1.

For C++ 5.0:

a.	In the Project Workspace, click the ResourceView tab.

b.	Double-click the tutor resources folder to open it.

c.	Double-click the Dialog folder to open it.

d.	Double-click IDD_TUTOR_DIALOG to design the dialog box.

e.	Select the TODO... text control; then press the Delete key to delete it.

f.	From the main menu, select Project > Add To Project > Components and Controls.

g.	Select Registered ActiveX Controls.

h.	Double-click the LEAD Vector Control (14.0) icon. (The Confirm Classes dialog box appears.)

i.	Ensure that CLEADVector, CLTVectorContainer, CLEADVectorLayer, COleFont, CLTVectorAutomation, CLEADVectorObject, and CPicture are checked.

j.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD Vector control appears in the Controls toolbar.)

k.	 Click the LEAD Vector control icon; then size and position the control as you want it to appear at run time.

l.	Use the right mouse button to edit the properties of the new LEAD Vector control.

m.	Change the ID to IDC_LEADVECTOR1.

9.	Do the following to add m_LEADVector1 to the CTutorDlg class and link the variable to the LEAD control using dynamic data exchange:

a.	Press Ctrl-W. (The MFC ClassWizard dialog box appears.)

b.	Click the Member Variables tab.

c.	In the Class Name box, select CTutorDlg.

d.	In the Control IDs list, select IDC_LEADVECTOR1.

e.	Click the Add Variable... button.

f.	Specify m_LEADVector1 as the variable name, and Control as the category.

g.	Click OK to close the dialog box, and click OK to close the MFC ClassWizard.

10.	Go to the OnInitDialog() function as follows:

a.	In the Project Workspace, click the ClassView tab.

b.	Double-click the tutor classes folder to open it.

c.	Expand the CTutorDlg class.

d.	Double-click the OnInitDialog() function to edit it.

11.	Edit the OnInitDialog() function to add the following code after the line that says //TODO: Add extra initialization here:

   m_LEADVector1.UnlockSupport (L_SUPPORT_VECTOR, "TestKey1");
   m_LEADVector1.UnlockSupport(L_SUPPORT_VECTOR_ALL, "TestKey2");

   // set wireframe mode
   m_LEADVector1.SetPolygonMode (VECTOR_POLYGON_LINE);

   // set default view
   m_LEADVector1.Reset (VECTOR_RESET_ALL);

12.	On the main menu, select Build > Build tutor.exe to build the project.

13.	On the main menu, select Build > Execute tutor.exe to run the project.


Vector Load and Save (Visual C++ 4.0 and later)

Take the following steps to add vector load and save functionality:

1.	Start with the project that you created in Creating an Empty Vector (Visual C++ 4.0 and later).

2.	Add two command buttons to your form and name them as follows:

ID	Caption

IDC_LOADVEC	Load

IDC_SAVEVEC	Save

3.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_LOADVEC.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnLoadVec).

f.	Click the Edit Code button and enter the following code:

void CTutorDlg::OnLoadVec()
{
   short nRet;
   // open a vector file, please change the path to your system
   nRet = m_LEADVector1.Load ("s:\\temp\\images\\dxf\\test.dxf");
   if(nRet != 0)
      AfxMessageBox("Cannot open file!");
   // set default view
   m_LEADVector1.Reset (VECTOR_RESET_ALL);
}

4.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_SAVEVEC.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnSaveVec).

f.	Click the Edit Code button and enter the following code:

void CTutorDlg::OnSaveVec()
{
   short nRet;
   // save a vector file, please change the path to your system
   nRet = m_LEADVector1.Save ("d:\\temp\\test.dxf", FILE_DXF);
   if(nRet != 0)
      AfxMessageBox("Cannot save file!");
}

5.	On the main menu, select Build > Build tutor.exe to build the project.

6.	On the main menu, select Build > Execute tutor.exe to run the project.


Transformation (Visual C++ 4.0 and later)

Take the following steps to add scale, rotation and translation to the sample program:

1.	Start with the project that you created in Vector Load and Save (Visual C++ 4.0 and later).

2.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_LEADVECTOR1.

d.	In the Messages list box, select KeyDown.

e.	Click the Add function button. Choose OK for the default function name (OnKeyDownLeadVector1).

f.	Click the Edit Code button and enter the following code:

void CTutorDlg::OnKeyDownLeadVector1(short KeyCode, short Shift)
{
    switch(KeyCode)
    {
    case 'X':
    case 'x':
      m_LEADVector1.SetRotation (m_LEADVector1.GetRotationX() + 5.0f,
                                m_LEADVector1.GetRotationY (),
                                m_LEADVector1.GetRotationZ (),
                                0.0f, 0.0f, 0.0f, FALSE, VECTOR_ALL_OBJECTS);
      break;
    case 'Y':
    case 'y':
      m_LEADVector1.SetRotation(m_LEADVector1.GetRotationX(),
                                m_LEADVector1.GetRotationY() + 5.0f,
                                m_LEADVector1.GetRotationZ(),
                                0.0f, 0.0f, 0.0f, FALSE, VECTOR_ALL_OBJECTS);
      break;
    case 'Z':
    case 'z':
      m_LEADVector1.SetRotation (m_LEADVector1.GetRotationX(),
                                m_LEADVector1.GetRotationY (),
                                m_LEADVector1.GetRotationZ () + 5.0f,
                                0.0f, 0.0f, 0.0f, FALSE, VECTOR_ALL_OBJECTS);
      break;
    case 187: //'+'
      m_LEADVector1.SetScaling (m_LEADVector1.GetScalingX() + 0.1,
                               m_LEADVector1.GetScalingY () + 0.1,
                               m_LEADVector1.GetScalingZ () + 0.1,
                                0.0f, 0.0f, 0.0f, FALSE, VECTOR_ALL_OBJECTS);
      break;
    case 189: //'-'
      m_LEADVector1.SetScaling(m_LEADVector1.GetScalingX() - 0.1,
                               m_LEADVector1.GetScalingY() - 0.1,
                               m_LEADVector1.GetScalingZ() - 0.1,
                                0.0f, 0.0f, 0.0f, FALSE, VECTOR_ALL_OBJECTS);
      break;
    case 'i':
    case 'I':
      m_LEADVector1.SetTranslation (m_LEADVector1.GetTranslationX(),
                                   m_LEADVector1.GetTranslationY () + 1.0f,
                                   m_LEADVector1.GetTranslationZ (),
                                   VECTOR_ALL_OBJECTS);
      break;
    case 'M':
    case 'm':
      m_LEADVector1.SetTranslation(m_LEADVector1.GetTranslationX(),
                                   m_LEADVector1.GetTranslationY() - 1.0f,
                                   m_LEADVector1.GetTranslationZ(),
                                   VECTOR_ALL_OBJECTS);
      break;
    case 'J':
    case 'j':
      m_LEADVector1.SetTranslation (m_LEADVector1.GetTranslationX() - 1.0f,
                                   m_LEADVector1.GetTranslationY (),
                                   m_LEADVector1.GetTranslationZ (),
                                   VECTOR_ALL_OBJECTS);
      break;
    case 'K':
    case 'k':
      m_LEADVector1.SetTranslation(m_LEADVector1.GetTranslationX() + 1.0f,
                                   m_LEADVector1.GetTranslationY(),
                                   m_LEADVector1.GetTranslationZ(),
                                   VECTOR_ALL_OBJECTS);
      break;
    }
}

3.	On the main menu, select Build > Build tutor.exe to build the project.

4.	On the main menu, select Build > Execute tutor.exe to run the project.


Using the Camera (Visual C++ 4.0 and later)

Take the following steps to support for the camera:

1.	Start with the project that you created in Transformation (Visual C++ 4.0 and later).

2.	Add the following to the code to the OnKeyDownLeadVector1 procedure:

    case 'B':
    case 'b':
      // flip camera projection between parallel and perspective
      if(m_LEADVector1.GetCameraUsePerspective())
         m_LEADVector1.SetCameraUsePerspective(FALSE);
      else
         m_LEADVector1.SetCameraUsePerspective(TRUE);
      break;
    case 'T':
    case 't':
      // rotate the camera theta angle
      m_LEADVector1.SetCameraTheta (m_LEADVector1.GetCameraTheta () + 5.0f);
      break;
    case 'P':
    case 'p':
      // rotate the camera phi angle
      m_LEADVector1.SetCameraPhi (m_LEADVector1.GetCameraPhi() + 5.0f);
      break;

3.	On the main menu, select Build > Build tutor.exe to build the project.

4.	On the main menu, select Build > Execute tutor.exe to run the project.


Using Vector Engines (Visual C++ 4.0 and later)

Take the following steps to add support for viewing vector drawing in different vector engines:

1.	Start with the project that you created in Using the Camera (Visual C++ 4.0 and later).

2.	Add a command button to your form and name it as follows:

ID	Caption

IDC_ENGINE	Engine

3.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_ENGINE.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnEngine).

f.	Click the Edit Code button and enter the following code:

void CTutorDlg::OnEngine()
{
   switch(m_LEADVector1.GetVectorEngine())
   {
   case VECTOR_ENGINE_GDI:
      //change to OpenGL
      m_LEADVector1.SetUseDoubleBuffer (TRUE);
      m_LEADVector1.SetVectorEngine (VECTOR_ENGINE_OPENGL);
      m_LEADVector1.SetPolygonMode (VECTOR_POLYGON_FILL);
      m_LEADVector1.SetUseLights (TRUE);
      m_LEADVector1.SetAmbientColor (RGB(0x3F, 0x3F, 0x3F));
      m_LEADVector1.Reset (VECTOR_RESET_ALL);
      break;
   case VECTOR_ENGINE_OPENGL:
      //change to GDI
      m_LEADVector1.SetUseDoubleBuffer (TRUE);
      m_LEADVector1.SetVectorEngine (VECTOR_ENGINE_GDI);
      m_LEADVector1.SetPolygonMode (VECTOR_POLYGON_LINE);
      m_LEADVector1.SetUseLights (TRUE);
      m_LEADVector1.SetAmbientColor (RGB(0x3F, 0x3F, 0x3F));
      m_LEADVector1.Reset (VECTOR_RESET_ALL);
      break;
   }
}

4.	On the main menu, select Build > Build tutor.exe to build the project.

5.	On the main menu, select Build > Execute tutor.exe to run the project.


Implementing Hit Testing (Visual C++ 4.0 and later)

Take the following steps to add support for hit testing different vector objects:

1.	Start with the project that you created in Using Vector Engines (Visual C++ 4.0 and later).

2.	Open tutordlg.cpp and add the following line to the top of the file after

 #include "tutorDlg.h"
#include "leadvectorobject.h"

3.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_LEADVECTOR1.

d.	In the Messages list box, select MouseMove.

e.	Click the Add function button. Choose OK for the default function name (OnMouseMoveLeadVector1).

f.	Click the Edit Code button and enter the following code:

void CTutorDlg::OnMouseMoveLeadVector1(short Button, short Shift, double X, double Y)
{
   BOOL bRet;
   CString szBuffer;
   // hit test object under mouse cursor
   m_LEADVector1.SetEnableMethodErrors (FALSE);
   bRet = m_LEADVector1.HitTest (X, Y);
   if(bRet)
   {
      // theres an object, show its type in main window caption
      switch(m_LEADVector1.GetCurrentObject ().GetType())
      {
      case VECTOR_VERTEX:
         szBuffer = "Vertex";
         break;
      case VECTOR_LINE:
         szBuffer = "Line";
         break;
      case VECTOR_RECTANGLE:
         szBuffer = "Rectangle";
         break;
      case VECTOR_POLYLINE:
         szBuffer = "Polyline";
         break;
      case VECTOR_POLYBEZIER:
         szBuffer = "Polybezier";
         break;
      case VECTOR_POLYGON:
         szBuffer = "Polygon";
         break;
      case VECTOR_ELLIPSE:
         szBuffer = "Ellipse";
         break;
      case VECTOR_CIRCLE:
         szBuffer = "Circle";
         break;
      case VECTOR_ARC:
         szBuffer = "Arc";
         break;
      case VECTOR_TEXT:
         szBuffer = "Text";
         break;
      case VECTOR_PIE:
         szBuffer = "Pie";
         break;
      case VECTOR_CHORD:
         szBuffer = "Chord";
         break;
      case VECTOR_RASTER:
         szBuffer = "Raster";
         break;
      case VECTOR_HPOLYBEZIER:
      szBuffer = "HPolyBezier";
         break;
     case VECTOR_SPLINE:
      szBuffer = "Spline";
         break;
      }
   }
   else
      szBuffer = "No object under mouse cursor";
   SetWindowText(szBuffer);
}

4.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_LEADVECTOR1.

d.	In the Messages list box, select MouseDown.

e.	Click the Add function button. Choose OK for the default function name (OnMouseDownLeadVector1).

f.	Click the Edit Code button and enter the following code:

void CTutorDlg::OnMouseDownLeadVector1(short Button, short Shift, double X, double Y)
{
   BOOL bRet;
   if(Button == 1)
   {
      // hit test object under mouse cursor
      bRet = m_LEADVector1.HitTest (X, Y);
      if(bRet)
      {
         // theres an object, flip its pen width between 1 and 4
      if (m_LEADVector1.GetCurrentObject ().GetEnableExtendedPen)

      {

      if(m_LEADVector1.GetCurrentObject ().GetExtendedLogicalPenWidth() == 1)
             m_LEADVector1.GetCurrentObject().SetExtendedLogicalPenWidth(4);
         else
             m_LEADVector1.GetCurrentObject().SetExtendedLogicalPenWidth(1);
      }
      else
      {
        if(m_LEADVector1.GetCurrentObject ().GetLogicalPenWidth() == 1)
             m_LEADVector1.GetCurrentObject().SetLogicalPenWidth(4);
         else
             m_LEADVector1.GetCurrentObject().SetLogicalPenWidth(1);
        }
      }
   }
   else if(Button == 2)
   {
      // hit test object under mouse cursor
      bRet = m_LEADVector1.HitTest (X, Y);
      if(bRet)
      {
         // theres an object, delete it
         m_LEADVector1.GetCurrentObject ().Delete();
      }
   }
}

5.	On the main menu, select Build > Build tutor.exe to build the project.

6.	On the main menu, select Build > Execute tutor.exe to run the project.


Working with layers (Visual C++ 4.0 and later)

Take the following steps to show/hide layers from a vector drawing:

1.	Start with the project that you created in Creating an Empty Vector (Visual C++ 4.0 and later).

2.	Open tutordlg.cpp and add the following line to the top of the file after

#include "tutorDlg.h"
#include "leadvectorlayer.h"

3.	Add the following line after the call to UnlockSupport in your InitDialog procedure.  Be sure to change the path to fit your system.  You must load an image that contains at least 2 layers for this sample to work.

   m_LEADVector1.Load("d:\\lead14\\dist\\images\\vector\\random.dxf");

4.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_LEADVECTOR1.

d.	In the Messages list box, select KeyDown.

e.	Click the Add function button. Choose OK for the default function name (OnKeyDownLeadVector1).

f.	Click the Edit Code button and enter the following code:

void CTutorDlg::OnKeyDownLeadVector1(short KeyCode, short Shift)
{
   CLEADVectorLayer Layer;
    switch(KeyCode)
    {
    case '1':
      // get layer from index
      Layer = m_LEADVector1.GetLayerByIndex (0);
      // flip the visible state of the layer
      Layer.SetVisible(!Layer.GetVisible());
      break;
    case '2':
      // get layer from index
      Layer = m_LEADVector1.GetLayerByIndex (1);
      // flip the visible state of the layer
      Layer.SetVisible(!Layer.GetVisible());
      break;
    }
}

5.	On the main menu, select Build > Build tutor.exe to build the project.

6.	On the main menu, select Build > Execute tutor.exe to run the project.


Adding and Displaying Vector Objects (Visual C++ 4.0 and later)

Take the following steps to start adding new layer and objects to the vector handle.

1.	Start with the project that you created in Implementing Hit Testing (Visual C++ 4.0 and later).

2.	Open tutordlg.cpp and add the following lines to the top of the file after

#include "tutorDlg.h"
#include "leadvectorlayer.h"
#include "leadvectorobject.h"

3.	Add two command buttons to your form and name them as follows:

ID	Caption

IDC_ADDLAYER	AddLayer

IDC_ADDOBJECT	AddObject

4.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CTutorDlg.

c.	In the Object IDs list box, select IDC_ADDLAYER.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnAddLayer).

void CTutorDlg::OnAddLayer()
{
   CLEADVectorLayer Layer;
   // fill in the layer descriptor structure and add new layer to the vector handle
   m_LEADVector1.AddLayer ("Default Layer", TRUE, FALSE, 0, 0);
   Layer = m_LEADVector1.GetLayerByName ("Default Layer");
   // make this the active layer in the vector handle
   Layer.SetActive();
}

5.	Code the AddObject button's click procedure as follows:

void CTutorDlg::OnAddObject()
{
   CLEADVectorObject NewLine;
   // add a new vector line
   NewLine = m_LEADVector1.AddNewObject (VECTOR_LINE);

   // set the line pen
   NewLine.SetPenColor(RGB(0,255,0));

   // set the line start and end points
   NewLine.SetX(0, 0.0f);
   NewLine.SetY(0, 0.0f);
   NewLine.SetZ(0, 0.0f);

   NewLine.SetX(0, 50.0f);
   NewLine.SetY(0, 50.0f);
   NewLine.SetZ(0, 0.0f);

   // add the object to the active layer
   NewLine.Insert(-1);

   m_LEADVector1.Reset (VECTOR_RESET_ALL);
}

6.	Run your program to test it.

7.	Save the project to use in other tutorials.


Implementing Vector Automation (Visual C++ 4.0 and later)

Take the following steps to start a project and to add some code that displays a vector on the main form:

1.	Start a new project as follows:

For C++ 4.x, run Microsoft Developer Studio for Visual C++, select the File >New menu option, select Project Workspace, and click the OK button. In the New Project Workspace dialog box, do the following:

a.	In the Type list box, select MFC AppWizard (exe).

b.	In the Name text box, specify AutTut.

c.	In the Location text box, specify the path of the project.

d.	In the Platforms list box, check Win32.

e.	Click the Create button.

For C++ 5.0, run Microsoft Visual C++ 5.0, select the File >New menu option, and do the following:

a.	Click the Projects tab.

b.	Select MFC AppWizard (exe) as the project type

c.	In the Project name text box, specify tutor.

d.	In the Location text box, specify the path of the project.

e.	Click the OK button.

2.	In the Step 1 dialog box, do the following:

a.	Select Dialog based.

b.	Click the Next button.

3.	In the Step 2 of 4 dialog box, do the following:

a.	Ensure that About Box is selected.

b.	Ensure that 3D Controls is selected.

c.	Select OLE Controls (ActiveX Controls in 5.0).

d.	Click the Next button.

4.	In the Step 3 of 4 dialog box, do the following:

a.	For comments, ensure that Yes, Please is selected.

b.	For how to use the MFC library, select As a statically linked library.

c.	Click the Next button.

5.	In the Step 4 of 4 dialog box, just click Finish.

6.	Read New Project Information, and click OK. (The AppWizard creates the project files and opens the project.)

7.	Add the LTVECOCX.H  and L_OCXERR.H files, which define LEAD constants, to your project as follows:

a.	Copy the \lead\include\ltvecocx.h, ltlck_.h, lttlbocx.h, and l_ocxerr.h files to your project directory.

b.	In the Project Workspace, click the FileView tab.

c.	Double-click the tutor files folder to open it.

d.	Double-click the Dependencies folder (the Header Files folder in 5.0) to open it.

e.	Double-click the StdAfx.h file to edit it.

f.	Add the following lines to the end of the file:

#include "LTVECOCX.H"
#include "L_OCXERR.H"
#include "LTTLBOCX.H"

8.	Add a LEAD Vector control to the main window as follows:

For C++ 4.x:

a.	In the Project Workspace, click the ResourceView tab.

b.	Double-click the tutor resources folder to open it.

c.	Double-click the Dialog folder to open it.

d.	Double-click IDD_AUTTUT_DIALOG to design the dialog box.

e.	Select the TODO... text control; then press the Delete key to delete it.

f.	From the main menu, select Insert > Component. (The Component Gallery appears.)

g.	Click the OLE Controls tab.

h.	Double-click the LEAD Vector Control (14.0) icon. (The Confirm Classes dialog box appears.)

i.	Ensure that CLEADVector, CLTVectorContainer, CLEADVectorLayer, COleFont, CLTVectorAutomation, CLEADVectorObject, and CPicture are checked.

j.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD Vector control appears in the Controls toolbar.)

k.	 Click the LEAD Vector control icon; then size and position the control as you want it to appear at run time.

l.	Double-click the new LEAD Vector control to edit its properties.

m.	Change the ID to IDC_LEADVECTOR1.

For C++ 5.0:

a.	In the Project Workspace, click the ResourceView tab.

b.	Double-click the tutor resources folder to open it.

c.	Double-click the Dialog folder to open it.

d.	Double-click IDD_AUTTUT_DIALOG to design the dialog box.

e.	Select the TODO... text control; then press the Delete key to delete it.

f.	From the main menu, select Project > Add To Project > Components and Controls.

g.	Select Registered ActiveX Controls.

h.	Double-click the LEAD Vector Control (14.0) icon. (The Confirm Classes dialog box appears.)

i.	Ensure that CLEADVector, CLTVectorContainer, CLEADVectorLayer, COleFont, CLTVectorAutomation, CLEADVectorObject, and CPicture are checked.

j.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD Vector control appears in the Controls toolbar.)

k.	 Click the LEAD Vector control icon; then size and position the control as you want it to appear at run time.

l.	Use the right mouse button to edit the properties of the new LEAD Vector control.

m.	Change the ID to IDC_LEADVECTOR1.

9.	Do the following to add m_LEADVector1 to the CAutTutDlg class and link the variable to the LEAD control using dynamic data exchange:

a.	Press Ctrl-W. (The MFC ClassWizard dialog box appears.)

b.	Click the Member Variables tab.

c.	In the Class Name box, select CAutTutDlg.

d.	In the Control IDs list, select IDC_LEADVECTOR1.

e.	Click the Add Variable... button.

f.	Specify m_LEADVector1 as the variable name, and Control as the category.

g.	Click OK to close the dialog box, and click OK to close the MFC ClassWizard.

10.	Add a LEAD ToolBar control to the main window as follows:

For C++ 4.x:

a.	In the Project Workspace, click the ResourceView tab.

b.	Double-click the tutor resources folder to open it.

c.	Double-click the Dialog folder to open it.

d.	Double-click IDD_AUTTUT_DIALOG to design the dialog box.

e.	Select the TODO... text control; then press the Delete key to delete it.

f.	From the main menu, select Insert > Component. (The Component Gallery appears.)

g.	Click the OLE Controls tab.

h.	Double-click the LEAD ToolBar Control (14.0) icon. (The Confirm Classes dialog box appears.)

i.	Ensure that CLEADToolBar, CLTToolBarButton, and CPicture are checked.

j.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD ToolBar control appears in the Controls toolbar.)

k.	 Click the LEAD ToolBar control icon; then add a control to the dialog.

l.	Double-click the new LEAD ToolBar control to edit its properties.

m.	Change the ID to IDC_LEADTOOLBAR1.

For C++ 5.0:

a.	In the Project Workspace, click the ResourceView tab.

b.	Double-click the tutor resources folder to open it.

c.	Double-click the Dialog folder to open it.

d.	Double-click IDD_AUTTUT_DIALOG to design the dialog box.

e.	Select the TODO... text control; then press the Delete key to delete it.

f.	From the main menu, select Project > Add To Project > Components and Controls.

g.	Select Registered ActiveX Controls.

h.	Double-click the LEAD ToolBar Control (14.0) icon. (The Confirm Classes dialog box appears.)

i.	Ensure that CLEADToolBar, CLTToolBarButton, and CPicture are checked.

j.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD ToolBar control appears in the Controls toolbar.)

k.	 Click the LEAD ToolBar control icon; then add a control to the dialog.

l.	Use the right mouse button to edit the properties of the new LEAD ToolBar control.

m.	Change the ID to IDC_LEADTOOLBAR1.

11.	Do the following to add m_LEADToolBar1 to the CAutTutDlg class and link the variable to the LEAD control using dynamic data exchange:

a.	Press Ctrl-W. (The MFC ClassWizard dialog box appears.)

b.	Click the Member Variables tab.

c.	In the Class Name box, select CAutTutDlg.

d.	In the Control IDs list, select IDC_LEADTOOLBAR1.

e.	Click the Add Variable... button.

f.	Specify m_LEADToolBar1 as the variable name, and Control as the category.

g.	Click OK to close the dialog box, and click OK to close the MFC ClassWizard.

12.	Go to the OnInitDialog() function as follows:

a.	In the Project Workspace, click the ClassView tab.

b.	Double-click the tutor classes folder to open it.

c.	Expand the CAutTutDlg class.

d.	Double-click the OnInitDialog() function to edit it.

13.	Edit the OnInitDialog() function to add the following code after the line that says //TODO: Add extra initialization here:

   m_LEADVector1.UnlockSupport(L_SUPPORT_VECTOR, "TestKey1");
   m_LEADVector1.UnlockSupport(L_SUPPORT_VECTOR_ALL, "TestKey2");

   //load a vector image
   m_LEADVector1.Load("s:\\temp\\images\\dxf\\test.dxf");

   // Turn on Vector Automation
   LPDISPATCH pToolbar=NULL;

   m_LEADVector1.SetVectorUserMode(VECTOR_USERMODE_AUTO);
   m_LEADToolBar1.CreateToolbar((long)m_LEADVector1.m_hWnd, "Vector Tools", TOOLBAR_VECTOR);
   pToolbar = (LPDISPATCH)m_LEADToolBar1.GetControlUnknown();
   m_LEADVector1.SetToolbarControl(pToolbar); //set toolbar
   m_LEADToolBar1.SetVisible(TRUE);

14.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select CAutTutDlg.

d.	In the Messages list box, select WM_DESTROY.

e.	Click the Add function button. Choose OK for the default function name (OnDestroy).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnDestroy()
{
   m_LEADVector1.SetToolbarControl(NULL);
   CDialog::OnDestroy();
}

15.	On the main menu, select Build > Build AutTut.exe to build the project.

16.	On the main menu, select Build > Execute AutTut.exe to run the project.


Adding The Automation Container (Visual C++ 4.0 and later)

Take the following steps to setup the Vector Automation Container:

1.	Start with the project that you created in Implementing Vector Automation.

2.	Take the following steps in order to process the LEAD Vector Control's window messages:

a.	Open the AutTutDlg.H file and add the following code to the file after the include section:

class CMyLEADVector : public CLEADVector
{
public:
   // Generated message map functions
   //{{AFX_MSG(CMyLEADVector)
   afx_msg void OnSetFocus(CWnd* pOldWnd);
   afx_msg void OnKillFocus(CWnd* pWnd);
   afx_msg void OnSize(UINT nType, int cx, int cy);
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()
};

b.	Find the declaration for m_LEADVector1:

CLEADVector	m_LEADVector1;

c.	Change that declartion to:

CMyLEADVector	m_LEADVector1;

d.	Now, open AutTutDlg.CPP and add the message map macro at the end of the file:

BEGIN_MESSAGE_MAP(CMyLEADVector, CWnd)
   //{{AFX_MSG_MAP(CMyLEADVector)
   ON_WM_SETFOCUS()
   ON_WM_KILLFOCUS()
   ON_WM_SIZE()
   //}}AFX_MSG_MAP

END_MESSAGE_MAP()

e.	Add the message processing functions at the end of the file:

void CMyLEADVector::OnSetFocus(CWnd* pOldWnd)
{
   LPDISPATCH pToolbar=NULL;
   if(this->GetVectorUserMode() == VECTOR_USERMODE_AUTO)
   {
      this->GetAutoContainer().SetActive(); //set active container
      pToolbar = (LPDISPATCH)gpToolBar->GetControlUnknown();
      this->SetToolbarControl(pToolbar); //set toolbar
   }
   CLEADVector::OnSetFocus(pOldWnd);
}

void CMyLEADVector::OnKillFocus(CWnd* pWnd)
{
   this->SetToolbarControl(NULL);
}

void CMyLEADVector::OnSize(UINT nType, int cx, int cy)
{
   if(this->GetVectorUserMode() == VECTOR_USERMODE_AUTO)
   {
      this->GetAutoContainer().SetLimitLeft (0);
      this->GetAutoContainer().SetLimitTop(0);
      this->GetAutoContainer().SetLimitWidth(cx);
      this->GetAutoContainer().SetLimitHeight(cy);
   }
}

f.	Add the following declaration to the top of the AutTutDlg.cpp file after the #include section:

CLEADToolBar *gpToolbar;

g.	Add the following line to the end of the OnInitDialog function, before the return:

gpToolBar = (CLEADToolBar*)&m_LEADToolBar1;

4.	Add the following to the top of AutTutDlg.CPP:

#include "ltvectorcontainer.h"
#include "leadvectorobject.h"

5.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select IDC_LEADVECTOR1.

d.	In the Messages list box, select MouseDown.

e.	Click the Add function button. Choose OK for the default function name (OnMouseDownLeadVector1).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnMouseDownLeadVector1(short Button, short Shift, double X, double Y)
{
   m_LEADVector1.SetEnableMethodErrors(FALSE);
   m_LEADVector1.HitTest(X, Y);
}

6.	Add two command buttons to your form and name them as follows:

ID	Caption
IDC_PROPS	ContainerProps
IDC_EDITOBJ	EditObject

7.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select IDC_PROPS.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnProps).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnProps()
{
   m_LEADVector1.SetEnableMethodErrors(FALSE);
   m_LEADVector1.GetAutoContainer().SetBorderColor(RGB(255,0,0));
   m_LEADVector1.GetAutoContainer().SetHandleColor(RGB(0,255,0));
   m_LEADVector1.GetAutoContainer().SetHandleWidth(8);
   m_LEADVector1.GetAutoContainer().SetHandleHeight(8);
   m_LEADVector1.GetAutoContainer().SetEnableHandles(TRUE);
}

8.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select IDC_EDITOBJ.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnEditObj).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnEditObj()
{
   m_LEADVector1.AutoEditObject(m_LEADVector1.GetCurrentObject().GethObject ());
}

9.	On the main menu, select Build > Build AutTut.exe to build the project.

10.	On the main menu, select Build > Execute AutTut.exe to run the project.

a.	Select an object by clicking it.

b.	Click the ContainerProps button

c.	Click the EditObject button


Setting Vector Automation Properties (Visual C++ 4.0 and later)

Take the following steps to set Vector Automation Properties:

1.	Start with the project that you created in Implementing Vector Automation.

2.	Add a command buttons to your form and name it as follows:

ID	Caption
IDC_AUTOPROPS	AutoProps

3.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select IDC_AUTOPROPS.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnAutoProps).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnAutoProps()
{
   //set the pen properties
   m_LEADVector1.GetAutomationProps().SetPenStyle (VECTOR_PS_SOLID);
   m_LEADVector1.GetAutomationProps().SetPenWidth(9);
   m_LEADVector1.GetAutomationProps().SetPenColor(RGB(0,255,0));
}

4.	Add the following to the top of the AutTutDlg.CPP file:

#include "ltvectorautomation.h"

5.	On the main menu, select Build > Build AutTut.exe to build the project.

6.	On the main menu, select Build > Execute AutTut.exe to run the project.

a.	Click the AutoProps button

b.	Select an tool from the toolbar (such as line) and add a new object.


Undo/Redo Capabilities (Visual C++ 4.0 and later)

Take the following steps to Add Undo/Redo Capabilities:

1.	Start with the project that you created in Implementing Vector Automation.

2.	Add three command buttons to your form and name them as follows:

ID	Caption
IDC_SETUNDO	SetUndo
IDC_UNDO	Undo
IDC_REDO	Redo

3.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select IDC_SETUNDO.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnSetUndo).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnSetundo()
{
   m_LEADVector1.SetUndoLevel(5);
}

4.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select IDC_UNDO.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnUndo).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnUndo()
{
   if(m_LEADVector1.CanUndo())
      m_LEADVector1.Undo(0);
}

5.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:

a.	Click the Message Maps tab.

b.	In the Class Name combo box, select CAutTutDlg.

c.	In the Object IDs list box, select IDC_REDO.

d.	In the Messages list box, select BN_CLICKED.

e.	Click the Add function button. Choose OK for the default function name (OnRedo).

f.	Click the Edit Code button and enter the following code:

void CAutTutDlg::OnRedo()
{
   if(m_LEADVector1.CanRedoCanRedomethod())
      m_LEADVector1.RedoRedomethod(0);
}

6.	On the main menu, select Build > Build AutTut.exe to build the project.

7.	On the main menu, select Build > Execute AutTut.exe to run the project.


Miscellaneous Examples (Visual C++ 4.0 and later)

You can test the following examples by either adding a command button and pasting the sample code in the Click procedure, or by cutting and pasting event code into the appropriate event in a lesson.

AddGroup example for C++ 4.0 and later

AddHyperLinkFile example for C++ 4.0 and later

AddLayer example for C++ 4.0 and later

Appearance example for C++ 4.0 and later

AutoContainer.Enabled example for C++ 4.0 and later

AutoContainer.LimitLeft example for C++ 4.0 and later

AutoContainer.ObjectCursor example for C++ 4.0 and later

AutoCopy example for C++ 4.0 and later

AutoCut example for C++ 4.0 and later

AutoDelete example for C++ 4.0 and later

AutoEditObject example for C++ 4.0 and later

AutomationProps.BrushStyleexample for C++ 4.0 and later

AutomationProps.FontHeight example for C++ 4.0 and later

AutomationProps.LogicalPenColor example for C++ 4.0 and later

AutoPaste example for C++ 4.0 and later

AutoRender example for C++ 4.0 and later

AutoScroll example for C++ 4.0 and later

AutoSelect example for C++ 4.0 and later

BorderStyle example for C++ 4.0 and later

CameraDlgUsePerspective example for C++ 4.0 and later

CameraPhi example for C++ 4.0 and later

CameraUsePerspective example for C++ 4.0 and later

Click example for C++ 4.0 and later

ClipboardReady example for C++ 4.0 and later

ClipMode example for C++ 4.0 and later

ConvertToEMFHandle example for C++ 4.0 and later

ConvertToWMFHandle example for C++ 4.0 and later

CopyFlags example for C++ 4.0 and later

CopyGroup example for C++ 4.0 and later

CopyLayer example for C++ 4.0 and later

CopyObject example for C++ 4.0 and later

CurrentObject.IsInsideParallelogram example for C++ 4.0 and later

CurrentObject.IsInsideRect example for C++ 4.0 and later

DblClick example for C++ 4.0 and later

DeleteObjects example for C++ 4.0 and later

EditLayerDlgActiveLayer example for C++ 4.0 and later

Empty example for C++ 4.0 and later

EnableMethodErrors example for C++ 4.0 and later

EnableUndo example for C++ 4.0 and later

EnableHelp example for C++ 4.0 and later

EnumGroups example for C++ 4.0 and later

EnumLayers example for C++ 4.0 and later

EnumObjects example for C++ 4.0 and later

EnumVertices example for C++ 4.0 and later

ExplodeObjects example for C++ 4.0 and later

FontMapper example for C++ 4.0 and later

GetActiveLayer example for C++ 4.0 and later

GetGroupByIndex example for C++ 4.0 and later

GetLayerByIndex example for C++ 4.0 and later

GetObjectsParallelogram example for C++ 4.0 and later

GetObjectsRect example for C++ 4.0 and later

HitTestDistance example for C++ 4.0 and later

HitTestDlgFlags example for C++ 4.0 and later

ILEADVectorGroup::Delete example for C++ 4.0 and later

ILEADVectorGroup::Empty example for C++ 4.0 and later

ILEADVectorLayer::Delete example for C++ 4.0 and later

ILEADVectorObject::Bitmap example for C++ 4.0 and later

ILEADVectorObject::BrushStyle example for C++ 4.0 and later

ILEADVectorObject::Delete example for C++ 4.0 and later

ILEADVectorObject::DllName example for C++ 4.0 and later

ILEADVectorObject::Explode example for C++ 4.0 and later

ILEADVectorObject::Flags example for C++ 4.0 and later

ILEADVectorObject::Hidden example for C++ 4.0 and later

ILEADVectorObject::PointCount example for C++ 4.0 and later

ILEADVectorObject::PointType example for C++ 4.0 and later

ILEADVectorObject::SectionsNumber example for C++ 4.0 and later

ILEADVectorObject::StartAngle example for C++ 4.0 and later

ILTVectorAutomation::CurrentTool example for C++ 4.0 and later

InvertColors example for C++ 4.0 and later

Is3D example for C++ 4.0 and later

IsAnObjectHidden example for C++ 4.0 and later

IsObjectsInsideParallelogram example for C++ 4.0 and later

IsObjectsInsideRect example for C++ 4.0 and later

KeyDown example for C++ 4.0 and later

KeyPress example for C++ 4.0 and later

KeyUp example for C++ 4.0 and later

LayerCount example for C++ 4.0 and later

Load example for C++ 4.0 and later

LoadMemory example for C++ 4.0 and later

Locked example for C++ 4.0 and later

LogicalToPhysical example for C++ 4.0 and later

MarkerPenStyle example for C++ 4.0 and later

MouseDown example for C++ 4.0 and later

MousePointer example for C++ 4.0 and later

MouseUp example for C++ 4.0 and later

NewLayerDlgName example for C++ 4.0 and later

ObjectParallelogramLeftTopX example for C++ 4.0 and later

PanX example for C++ 4.0 and later

ParallelogramMinX example for C++ 4.0 and later

PhysicalToLogical example for C++ 4.0 and later

PolygonMode example for C++ 4.0 and later

PreferredLoadFormat Example for Visual C++ 4.0

Realize example for C++ 4.0 and later

Redo example for C++ 4.0 and later

RenderDlgUseLights example for C++ 4.0 and later

Render example for C++ 4.0 and later

Reset example for C++ 4.0 and later

Resize example for C++ 4.0 and later

RotationDlgOriginX example for C++ 4.0 and later

Save example for C++ 4.0 and later

SaveArray example for C++ 4.0 and later

ScaleDlgOriginX example for C++ 4.0 and later

ScaleHeight example for C++ 4.0 and later

ScaleMode example for C++ 4.0 and later

SelectAllObjects example for C++ 4.0 and later

SetDlgString example for C++ 4.0 and later

SetRotation example for C++ 4.0 and later

SetScaling example for C++ 4.0 and later

SetTranslation example for C++ 4.0 and later

Show3DOptionsDlg example for C++ 4.0 and later

ShowCameraDlg example for C++ 4.0 and later

ShowEditAllGroupsDlg example for C++ 4.0 and later

ShowEditAllLayersDlg example for C++ 4.0 and later

ShowEditGroupDlg example for C++ 4.0 and later

ShowEditObjectDlg example for C++ 4.0 and later

ShowNewObjectDlg example for C++ 4.0 and later

ShowRotateDlg example for C++ 4.0 and later

ShowScaleDlg example for C++ 4.0 and later

ShowTranslateDlg example for C++ 4.0 and later

StartFeedLoad example for C++ 4.0 and later

ToolbarControl example for C++ 4.0 and later

Tooltip example for C++ 4.0 and later

Undo example for C++ 4.0 and later

UndoLevel example for C++ 4.0 and later

UnlockSupport example for C++ 4.0 and later

UseLights example for C++ 4.0 and later

VectorContainer example for C++ 4.0 and later

VectorDataPath Example for Visual C++ 4.0 and later

VectorEngine example for C++ 4.0 and later

VectorEvent event example for C++ 4.0 and later

VectorEvent method example for C++ 4.0 and later

VectorUserMode example for C++ 4.0 and later

VertexBindMode example for C++ 4.0 and later

ViewContext example for C++ 4.0 and later

ViewMode example for C++ 4.0 and later

ViewModeDlgViewMode example for C++ 4.0 and later

ViewportLeft example for C++ 4.0 and later

ZoomRect example for C++ 4.0 and later


AddGroup example for C++ 4.0 and later

   short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;
   CLEADVectorGroup NewGroup;

   //setup the vector
   m_LEADVector1.SetParallelogramMinX(0.0f);
   m_LEADVector1.SetParallelogramMinY(0.0f);
   m_LEADVector1.SetParallelogramMinZ(0.0f);

   m_LEADVector1.SetParallelogramMaxX(5.0f);
   m_LEADVector1.SetParallelogramMaxY(5.0f);
   m_LEADVector1.SetParallelogramMaxZ(0.0f);

   m_LEADVector1.SetOriginX(5.0f / 2.0f);
   m_LEADVector1.SetOriginY(5.0f / 2.0f);
   m_LEADVector1.SetOriginZ(0.0f);

   m_LEADVector1.SetCameraLookAtX(m_LEADVector1.GetOriginX());
   m_LEADVector1.SetCameraLookAtY(m_LEADVector1.GetOriginY());
   m_LEADVector1.SetCameraLookAtZ(m_LEADVector1.GetOriginZ());

   nRet = m_LEADVector1.AddGroup("My Group", 99, 0);
   if(nRet != 0)
   {
    AfxMessageBox("Can't Add Group!");
    return;
   }

   NewGroup = m_LEADVector1.GetGroupByName("My Group");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_LINE);
   NewObject.SetX(0, 0.0f);
   NewObject.SetY (0, 0.0f);
   NewObject.SetZ (0, 0.0f);
   NewObject.SetX(1, 1.0f);
   NewObject.SetY(1, 1.0f);
   NewObject.SetZ(1, 0.0f);
   NewObject.SetPenColor (RGB(255,0,0));
   nRet = NewObject.InsertInGroup(NewGroup.GetId());
   if(nRet != 0)
   {
      AfxMessageBox("Can't Insert Object!");
      return;
   }

   NewObject.ReleaseDispatch();
   NewObject.DetachDispatch();

   NewObject = m_LEADVector1.AddNewObject(VECTOR_LINE);
   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 0.0f);
   NewObject.SetZ(0, 0.0f);
   NewObject.SetX(1, 0.0f);
   NewObject.SetY(1, 1.0f);
   NewObject.SetZ(1, 0.0f);
   NewObject.SetPenColor(RGB(255,0,0));
   nRet = NewObject.InsertInGroup(NewGroup.GetId());
   if(nRet != 0)
   {
      AfxMessageBox("Can't Insert Object!");
      return;
   }

   //create an empty layer
   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
   {
      AfxMessageBox("Can't Add Layer!");
      return;
   }
   NewLayer = m_LEADVector1.GetLayerByName("My Layer");

   //now, clone the group
   NewObject.ReleaseDispatch();
   NewObject.DetachDispatch();

   NewObject = m_LEADVector1.AddNewObject(VECTOR_CLONE);
   NewObject.SetCloneGroup(NewGroup.GetId());
   NewObject.SetX(0, 2.0f);
   NewObject.SetY(0, 2.0f);
   NewObject.SetZ(0, 0.0f);

   NewObject.SetScaleX(2.0f);
   NewObject.SetScaleY(2.0f);
   NewObject.SetScaleZ(2.0f);

   NewObject.SetRotationX(0.0f);
   NewObject.SetRotationY(0.0f);
   NewObject.SetRotationZ(0.0f);

   NewObject.SetFlags(0); //use original settings

   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
   {
      AfxMessageBox("Can't Insert Object!");
      return;
   }

   //now, clone the group again
   NewObject.ReleaseDispatch();
   NewObject.DetachDispatch();

   NewObject = m_LEADVector1.AddNewObject(VECTOR_CLONE);
   NewObject.SetCloneGroup(NewGroup.GetId());
   NewObject.SetX(0, 4.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 0.0f);

   NewObject.SetScaleX(1.0f);
   NewObject.SetScaleY(1.0f);
   NewObject.SetScaleZ(1.0f);

   NewObject.SetRotationX(0.0f);
   NewObject.SetRotationY(0.0f);
   NewObject.SetRotationZ(45.0f);

   NewObject.SetFlags(VECTOR_CLONE_USE_PEN);
   NewObject.SetPenColor(RGB(0,0,255)); //this clone will be blue
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
   {
      AfxMessageBox("Can't Insert Object!");
      return;
   }


AddHyperLinkFile example for C++ 4.0 and later

void CVectorView::OnOptionsInvertcolors()
{
   BOOL bObject;
   BOOL bNewWindow;
   long nId;
   HWND hwndParent;
   BSTR strPath;

   strPath = ::SysAllocStringLen( NULL, 50 );
   m_LastSelectedObject.AddHyperlinkFile ( "c:\\canoe.cgm", (long)this->m_hWnd );
   m_LastSelectedObject.AddHyperlinkObject ( m_TargetObject.m_lpDispatch, FALSE );
   if ( m_LastSelectedObject.GetHyperlinkCount ( ) > 0 )
   {
       m_LastSelectedObject.SetHyperlinkFile ( 0, "c:\\corvette.cgm", NULL );
       m_LastSelectedObject.SetHyperlinkObject ( 1, m_TargetObject.m_lpDispatch, TRUE );
   }

   for( long i= 0 ; i < m_LastSelectedObject.GetHyperlinkCount ( ) ; i++ )
   {
       m_LastSelectedObject.GetHyperlink ( i, &bObject, &nId, &bNewWindow, &strPath, (long *)&hwndParent );

       if( bObject )
           MessageBox( "Target is Object" );
       else
           MessageBox( "Target is the file " );

   }

   /* jump to the first target */
   m_LastSelectedObject.GotoHyperlink ( 0 );

   ::SysFreeString( strPath );
}


AddLayer example for C++ 4.0 and later

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_LINE);
   NewObject.SetRop(VECTOR_R2_NOTCOPYPEN);
   NewObject.SetUserTag(99); //set a user tag
   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 0.0f);
   NewObject.SetX(1, 2.0f);
   NewObject.SetY(1, 2.0f);
   NewObject.SetZ(1, 0.0f);
   NewObject.SetLogicalPenColor(RGB(255,0,0));
   NewObject.SetLogicalPenStyle(VECTOR_PS_SOLID);
   NewObject.SetLogicalPenWidth(5);
   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");

void CVec12mfcDlg::OnVectorObjectsLeadvectorctrl1(LPDISPATCH pObject)
{
   CLEADVectorObject Object(pObject);
   CString csOut;
   if(Object.GetUserTag() == 99) //found our UserTag
   {
      csOut.Format("Object with UserTag = 99 has ID = %d", Object.GetId());
      AfxMessageBox(csOut);
   }
   Object.DetachDispatch();
}


Appearance example for C++ 4.0 and later

if(m_LEADVector1.GetAppearance() == 0)
      m_LEADVector1.SetAppearance(1);
   else
      m_LEADVector1.SetAppearance(0);


AutoContainer.Enabled example for C++ 4.0 and later

   //toggle automation container
   if(m_LEADVector1.GetAutoContainer().GetEnabledI())
      m_LEADVector1.GetAutoContainer().SetEnabled(FALSE);
   else
      m_LEADVector1.GetAutoContainer().SetEnabled(TRUE);


AutoContainer.LimitLeft example for C++ 4.0 and later

class CMyLEADVector : public CLEADVector
{
public:
   // Generated message map functions
   //{{AFX_MSG(CMyLEADVector)
   //}}AFX_MSG
   afx_msg void OnSize(UINT nType, int cx, int cy);
   DECLARE_MESSAGE_MAP()
};

BEGIN_MESSAGE_MAP(CMyLEADVector, CWnd)
   //{{AFX_MSG_MAP(CMyLEADVector)
   //}}AFX_MSG_MAP
   ON_WM_SIZE()
END_MESSAGE_MAP()

void CMyLEADVector::OnSize(UINT nType, int cx, int cy)
{
   if(this->GetVectorUserMode () == VECTOR_USERMODE_AUTO)
   {
      this->GetAutoContainer().SetLimitLeft (0);
      this->GetAutoContainer().SetLimitTop(0);
      this->GetAutoContainer().SetLimitWidth(cx);
      this->GetAutoContainer().SetLimitHeight(cy);
   }
}


AutoContainer.ObjectCursor example for C++ 4.0 and later

   HICON hIcon=NULL;
   LPPICTUREDISP pDisp=NULL;
   PICTDESC picdesc;

   hIcon = ::LoadIcon(NULL, MAKEINTRESOURCE(IDI_HAND));
   picdesc.cbSizeofstruct = sizeof(PICTDESC);
   picdesc.picType        = PICTYPE_ICON;
   picdesc.icon.hicon     = hIcon;
   OleCreatePictureIndirect(&picdesc, IID_IPicture, TRUE, (void**)&pDisp);
   m_LEADVector1.GetAutoContainer().SetObjectCursor (VECTOR_CONTAINER_OBJECT_TYPE_LINE, (LPDISPATCH)pDisp);


AutoCopy example for C++ 4.0 and later

   m_LEADVector1.AutoCopy(0);


AutoCut example for C++ 4.0 and later

   m_LEADVector1.AutoCut(0);


AutoDelete example for C++ 4.0 and later

   m_LEADVector1.AutoDelete (0);


AutoEditObject example for C++ 4.0 and later

void CVec12mfcDlg::OnMouseDownLeadvectorctrl1 (short Button, short Shift, double X, double Y)
{
   m_LEADVector1.SetEnableMethodErrors(FALSE);
   if(m_LEADVector1.HitTest(X, Y))
      m_LEADVector1.AutoEditObject(m_LEADVector1.GetCurrentObject());
}


AutomationProps.BrushStyle example for C++ 4.0 and later

void SetBrushProperties(VectorBrushStyles VectorBrushStyle)
{
   switch(VectorBrushStyle)
   {
   case VECTOR_BRUSH_STANDARD:
      m_LEADVector1.GetAutomationProps().SetBrushStyleILTVectorAutomation (VECTOR_BRUSH_STANDARD);
      m_LEADVector1.GetAutomationProps().SetStandardBrushColorILTVectorAutomation (RGB(255,0,0));
      m_LEADVector1.GetAutomationProps().SetStandardBrushStyle(VECTOR_BS_HATCHED);
      m_LEADVector1.GetAutomationProps().SetStandardBrushHatch(VECTOR_HS_CROSS);
   break;
   case VECTOR_BRUSH_HATCH:
      m_LEADVector1.GetAutomationProps().SetBrushStyleILTVectorAutomation (VECTOR_BRUSH_HATCH);
      m_LEADVector1.GetAutomationProps().SetHatchBrushStyle (VECTOR_HATCH_BRUSH_LINE);
      m_LEADVector1.GetAutomationProps().SetHatchBrushPenColor(RGB(255,0,0));
      m_LEADVector1.GetAutomationProps().SetHatchBrushPenStyle(VECTOR_PS_DASH);
      m_LEADVector1.GetAutomationProps().SetHatchBrushPenWidth(1);
      m_LEADVector1.GetAutomationProps().SetHatchBrushBrushStyle(VECTOR_BS_SOLID);
      m_LEADVector1.GetAutomationProps().SetHatchBrushBrushColor(RGB(0,255,0));
      m_LEADVector1.GetAutomationProps().SetHatchBrushBrushHatch(0);
      m_LEADVector1.GetAutomationProps().SetHatchBrushStepSize(15);
      m_LEADVector1.GetAutomationProps().SetHatchBrushLineRotation(30);
      m_LEADVector1.GetAutomationProps().SetHatchBrushFlags(0);
      m_LEADVector1.GetAutomationProps().SetHatchBrushPointCount(0);
   break;
   case VECTOR_BRUSH_PATTERN:
      m_LEADVector1.GetAutomationProps().SetBrushStyle (VECTOR_BRUSH_PATTERN);
      m_LEADVector1.GetAutomationProps().SetPatternBrushBitmap
 (m_LEAD1.GetBitmap());
    break;
   case VECTOR_BRUSH_GRADIENT:
      m_LEADVector1.GetAutomationProps().SetBrushStyle (VECTOR_BRUSH_GRADIENT);
      m_LEADVector1.GetAutomationProps().SetGradientBrushStartColor(RGB(0,0,0));
      m_LEADVector1.GetAutomationProps().SetGradientBrushEndColor(RGB(192,192,192));
      m_LEADVector1.GetAutomationProps().SetGradientBrushSteps (30);
      m_LEADVector1.GetAutomationProps().SetGradientBrushStyle(VECTOR_GRADIENT_LINE_L_TO_R);
   break;
   }
}


AutomationProps.FontHeight example for C++ 4.0 and later

   m_LEADVector1.GetAutomationProps().SetFontHeight (14);
   m_LEADVector1.GetAutomationProps().SetFontUnderline(TRUE);
   m_LEADVector1.GetAutomationProps().SetFontItalic(TRUE);
   m_LEADVector1.GetAutomationProps().SetFontOrientation(0);
   m_LEADVector1.GetAutomationProps().SetFontEscapement(0);
   m_LEADVector1.GetAutomationProps().SetFontWidth(14);
   m_LEADVector1.GetAutomationProps().SetFontFaceName("Bones");
   m_LEADVector1.GetAutomationProps().SetFontPitchAndFamily(0);
   m_LEADVector1.GetAutomationProps().SetFontQuality(0);
   m_LEADVector1.GetAutomationProps().SetFontClipPrecision(0);
   m_LEADVector1.GetAutomationProps().SetFontOutPrecision(0);
   m_LEADVector1.GetAutomationProps().SetFontCharSet(0);
   m_LEADVector1.GetAutomationProps().SetFontStrikeOut(TRUE);
   m_LEADVector1.GetAutomationProps().SetFontWeight(700);


AutomationProps.LogicalPenColor example for C++ 4.0 and later

void SetPenProperties( BOOL bExtendedPen )
{
   if (!bExtendedPen)
   {
      m_LEADVector1.GetAutomationProps().SetEnableExtendedPen (FALSE);
      m_LEADVector1.GetAutomationProps().SetLogicalPenColor (RGB(0,255,0));
      m_LEADVector1.GetAutomationProps().SetLogicalPenStyle(VECTOR_PS_DASH);
      m_LEADVector1.GetAutomationProps().SetLogicalPenWidth(1);
   }
   else
   {
      m_LEADVector1.GetAutomationProps().SetEnableExtendedPen  (TRUE);
      m_LEADVector1.GetAutomationProps().SetExtendedLogicalPenStyle(PS_SOLID|PS_ENDCAP_FLAT|PS_JOIN_BEVEL);
      m_LEADVector1.GetAutomationProps().SetExtendedLogicalPenWidth(2);
      m_LEADVector1.GetAutomationProps().SetExtendedLogicalPenBrushStyle(BS_SOLID);
      m_LEADVector1.GetAutomationProps().SetExtendedLogicalPenColor(RGB(255,0,0));
      m_LEADVector1.GetAutomationProps().SetExtendedLogicalPenHatch(0);
      m_LEADVector1.GetAutomationProps().SetExtendedLogicalPenEntriesNumber(0);
   }
}


AutoPaste example for C++ 4.0 and later

   if(m_LEADVector1.ClipboardReady())
      m_LEADVector1.AutoPaste(0);


AutoRender example for C++ 4.0 and later

   m_LEADVector1.AutoRender(0);


AutoSelect example for C++ 4.0 and later

   m_LEADVector1.AutoSelect(VECTOR_AUTOMATION_SELTYPE_NONE, 0);


AutoScroll example for C++ 4.0 and later

//toggle AutoScroll
   if(m_LEADVector1.GetAutoScroll())
      m_LEADVector1.SetAutoScroll(FALSE);
   else
      m_LEADVector1.SetAutoScroll(TRUE);


BorderStyle example for C++ 4.0 and later

//Set Control to have border
   m_LEADVector1.SetAppearance(0);
   m_LEADVector1.SetBorderStyle(1);


CameraDlgUsePerspective example for C++ 4.0 and later

   m_LEADVector1.SetCameraDlgDistance(m_LEADVector1.GetCameraDistance());
   m_LEADVector1.SetCameraDlgUsePerspective(m_LEADVector1.GetCameraUsePerspective());
   m_LEADVector1.SetCameraDlgLookAtX(m_LEADVector1.GetCameraLookAtX());
   m_LEADVector1.SetCameraDlgLookAtY(m_LEADVector1.GetCameraLookAtY());
   m_LEADVector1.SetCameraDlgLookAtZ(m_LEADVector1.GetCameraLookAtZ());
   m_LEADVector1.SetCameraDlgPhi(m_LEADVector1.GetCameraPhi());
   m_LEADVector1.SetCameraDlgTheta(m_LEADVector1.GetCameraPhi());
   m_LEADVector1.ShowCameraDlg(VECTOR_DLG_SHOWPREVIEW | VECTOR_DLG_AUTOPROCESS);


CameraUsePerspective example for C++ 4.0 and later

   m_LEADVector1.SetAutoRepaint(FALSE);
   m_LEADVector1.SetCameraTheta(30.0f);
   m_LEADVector1.SetCameraPhi(20.0f);
   m_LEADVector1.SetCameraUsePerspective(TRUE);
   m_LEADVector1.SetCameraDistance(200);

   //center the camera at the origin of the drawing
   m_LEADVector1.SetCameraLookAtX(m_LEADVector1.GetOriginX());
   m_LEADVector1.SetCameraLookAtY(m_LEADVector1.GetOriginYOriginY());
   m_LEADVector1.SetCameraLookAtZ(m_LEADVector1.GetOriginZ OriginZ());
   m_LEADVector1.SetAutoRepaint(TRUE);


CameraPhi example for C++ 4.0 and later

//move the camera
   m_LEADVector1.SetAutoRepaint(FALSE);
   m_LEADVector1.SetCameraPhi(20);
   m_LEADVector1.SetCameraTheta(30);
   m_LEADVector1.SetCameraZoom(200);
   m_LEADVector1.SetAutoRepaint(TRUE);


Click example for C++ 4.0 and later

void CVectestDlg::OnClick Leadvectorctrl1()
{
   AfxMessageBox("control was clicked");
}


ClipboardReady example for C++ 4.0 and later

   BOOL bRet;
   m_LEADVector1.Copy(VECTOR_FLAGS_SELECTED_ONLY);
   bRet = m_LEADVector2.ClipboardReady();
   if(bRet)
      m_LEADVector2.Paste (VECTOR_FLAGS_REPLACE);


ClipMode example for C++ 4.0 and later

void CVectorView::OnClick()
{
   if ( 0 == m_LEADVector1.GetClipMode ( ) )
       m_LEADVector1.SetClipMode ( 5 );

   m_LEADVector1.SetAntiAliasingDim ( 3 );
   m_LEADVector1.SetAntiAliasingFilter ( 0 );  // ANTIALIAS_1
   m_LEADVector1.SetAntiAliasingThreshold ( 128 );

   if( m_LEADVector1.GetRenderTextAsCurves( ) )
   {
       MessageBox( "Default text rendering will be used now" );
       m_LEADVector1.SetRenderTextAsCurves ( FALSE );
   }
}


ConvertToEMFHandle example for C++ 4.0 and later

HENHMETAFILE hEMF;
   m_LEADVector1.SetBackColor(RGB(0,255,0));

   CMetaFileDC EMF;
   CDC* pRefDC=NULL;
   pRefDC = GetDC();
   RECT rcBounds;
   ::SetRect(&rcBounds, 0, 0, 100, 100);
   EMF.CreateEnhanced(pRefDC, NULL, &rcBounds, "Test");
   ReleaseDC(pRefDC);

   EMF.MoveTo(  0,   0);
   EMF.LineTo(100, 100);
   EMF.MoveTo(100,   0);
   EMF.LineTo(  0, 100);

   hEMF = EMF.CloseEnhanced();
   m_LEADVector1.ConvertFromEMFHandle((long)hEMF);
   DeleteEnhMetaFile(hEMF);
   hEMF=NULL;

   hEMF = (HENHMETAFILE)m_LEADVector1.ConvertToEMFHandle(0,0,0,0);
   CopyEnhMetaFile(hEMF, "d:\\temp\\test.emf");
   DeleteEnhMetaFile(hEMF);


ConvertToWMFHandle example for C++ 4.0 and later

HMETAFILE hWMF;
   m_LEADVector1.SetBackColor(RGB(0,255,0));

   CMetaFileDC WMF;
   WMF.Create();

   WMF.MoveTo(  0,   0);
   WMF.LineTo(100, 100);
   WMF.MoveTo(100,   0);
   WMF.LineTo(  0, 100);

   hWMF = WMF.Close();
   m_LEADVector1.ConvertFromWMFHandle((long)hWMF);
   DeleteMetaFile(hWMF);
   hWMF=NULL;

   hWMF = (HMETAFILE)m_LEADVector1.ConvertToWMFHandle(0,0,0,0);
   CopyMetaFile(hWMF, "d:\\temp\\test.wmf");
   DeleteMetaFile(hWMF);


CopyFlags example for C++ 4.0 and later

   m_LEADVector2.SetCopyFlags (VECTOR_FLAGS_SELECTED_ONLY | VECTOR_FLAGS_REPLACE);
   m_LEADVector2.SetVector(m_LEADVector1.GetVector());


CopyGroup example for C++ 4.0 and later

   CLEADVectorGroup NewGroup;
   long Index;
   short nRet;

   Index = m_LEADVector1.GetGroupCount();
   m_LEADVector1.ShowNewGroupDlg(VECTOR_DLG_AUTOPROCESS);
   NewGroup = m_LEADVector1.GetGroupByName(m_LEADVector1.GetNewGroupDlgName());
   //copy the group at index 0 to the new group
   nRet = m_LEADVector1.CopyGroup(Index, m_LEADVector1.GetVector(), 0, 0);


CopyLayer example for C++ 4.0 and later

   short nRet;
   CLEADVectorLayer LayerDst;
   CLEADVectorLayer LayerSrc;

   LayerDst = m_LEADVector2.GetLayerByIndex(0);
   LayerSrc = m_LEADVector1.GetLayerByIndex(0);

   LayerDst.SetActive();
   LayerSrc.SetActive();

   //copy all objects from active layer in vector1 to activelayer in vector2
   nRet = m_LEADVector2.CopyLayer(-1, m_LEADVector1.GetVector(), -1, 0);
   if(nRet != 0)
      AfxMessageBox("Can't copy layer!");


CopyObject example for C++ 4.0 and later

short nRet;
   CLEADVectorLayer NewLayer;

   //add a new layer for LEADVector2
   m_LEADVector2.SetLocked(FALSE);
   nRet = m_LEADVector2.AddLayer("My New Layer", TRUE, FALSE, 0, 0);
   NewLayer = m_LEADVector2.GetLayerByName("My New Layer");
   NewLayer.SetActive();
   NewLayer.SetVisible(TRUE);

   //manually copy each selected object from LEADVector1 to LEADVector2
   m_LEADVector1.EnumObjects(VECTOR_FLAGS_SELECTED_ONLY);

void CVec12mfcDlg::OnVectorObjectsLeadvectorctrl1(LPDISPATCH pObject)
{
   CLEADVectorObject Object(pObject);
   short nRet;
   //manual copy each selected object into active layer of LEADVector2
   if(Object.GetSelected())
   {
      nRet = m_LEADVector2.CopyObject(Object.GetHObject(), m_LEADVector1.GetVector(), -1);
      if(nRet != 0)
         AfxMessageBox("Can't Copy Object!");
   }
   Object.DetachDispatch();
}


CurrentObject.IsInsideParallelogram example for C++ 4.0 and later

float x1;
   float y1;
   float z1;
   float x2;
   float y2;
   float z2;

   x1 = m_LEADVector1.GetObjectParallelogramLeftTopX();
   y1 = m_LEADVector1.GetObjectParallelogramLeftTopY();
   z1 = m_LEADVector1.GetObjectParallelogramLeftTopZ();
   x2 = m_LEADVector1.GetObjectParallelogramRightBottomX();
   y2 = m_LEADVector1.GetObjectParallelogramRightBottomY();
   z2 = m_LEADVector1.GetObjectParallelogramRightBottomZ();

   //select all objects that are in the specified parallelogram
   CLEADVectorObject CurrentObject;
   CurrentObject = m_LEADVector1.GetCurrentObject();
   if(CurrentObject.IsInsideParallelogram(x1, y1, z1, x2, y2, z2))
      CurrentObject.SetSelected(TRUE);


CurrentObject.IsInsideRect example for C++ 4.0 and later

//select all objects that are in the specified rectangle
   CLEADVectorObject CurrentObject;
   CurrentObject = m_LEADVector1.GetCurrentObject();
   if(CurrentObject.IsInsideRect(60.0f, 0.0f, 230.0f, 190.0f))
      CurrentObject.SetSelected(TRUE);


DblClick example for C++ 4.0 and later

void CVectestDlg::OnDblClickLeadvectorctrl1()
{
   AfxMessageBox("control was double clicked");
}


DeleteObjects example for C++ 4.0 and later

   //delete selected objects
   m_LEADVector1.DeleteObjects(VECTOR_FLAGS_SELECTED_ONLY);


EditLayerDlgActiveLayer example for C++ 4.0 and later

   m_LEADVector1.SetEditLayerDlgActiveLayer(FALSE);
   m_LEADVector1.ShowEditLayerDlg(0);


Empty example for C++ 4.0 and later

   if(m_LEADVector1.IsEmpty() == FALSE)
   {
      AfxMessageBox("Vector was not empty");
      m_LEADVector1.Empty();
   }
   else
      AfxMessageBox("Vector was already empty");


EnableHelp example for C++ 4.0 and later

void CVectorView::OnHelpEnablecontextsensitivehelp()
{
m_LEADVector1.SetEnableHelp ( !m_LEADVector1.GetEnableHelp( ) );
}

void CVectorView::OnUpdateHelpEnablecontextsensitivehelp(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck( m_LEADVector1.GetEnableHelp( ) ? 1 : 0 );
   pCmdUI->Enable( m_bImageLoaded );

}

void CVectorView::OnHelpEnablevectordialoghelpbutton()
{
m_LEADVector1.SetEnableDlgHelpButton( !m_LEADVector1.GetEnableDlgHelpButton( ) );

}

void CVectorView::OnUpdateHelpEnablevectordialoghelpbutton(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck( m_LEADVector1.GetEnableDlgHelpButton( ) ? 1 : 0 );
   pCmdUI->Enable( m_bImageLoaded && m_LEADVector1.GetEnableHelp( ) );

}

void CVectorView::OnHelpLeadvectorctrl1(long nDlgID, long hElement, long nCtlID)
{
   char  szBuffer[ 255 ];

   if( 0 == hElement && 0 == nCtlID )
   {
      /* dialog help button */
      sprintf( szBuffer, "Help button for dialog %d", nDlgID );
   }
   else
   {
      /* context sensitive help */
      sprintf( szBuffer, "Context sensitive help for dialog %d, control %d", nDlgID, nCtlID );
   }
   MessageBox( szBuffer );
}


EnableMethodErrors example for C++ 4.0 and later

    //disable runtime error exceptions
   m_LEADVector1.SetEnableMethodErrors(FALSE);
   m_LEADVector2.SetEnableMethodErrors(FALSE);
   //load a vector
   m_LEADVector1.Load("s:\\temp\\images\\dxf\\test.dxf");
   //copy vector to a 2nd control
   m_LEADVector2.SetVector(m_LEADVector1.GetVector());


EnableUndo example for C++ 4.0 and later

   m_LEADVector1.SetAutoRepaint(FALSE);
   m_LEADVector1.SetVectorUserMode(VECTOR_USERMODE_AUTO);
   m_LEADVector1.SetUndoLevel(10);
   m_LEADVector1.AddUndoNode(0);
   m_LEADVector1.EnableUndo(FALSE);
   m_LEADVector1.SetRotation(10, 10, -10, 0, 0, 0, FALSE, VECTOR_ALL_OBJECTS);
   m_LEADVector1.SetTranslation(3, 3, -3, VECTOR_ALL_OBJECTS);
   m_LEADVector1.SetScaling(2, 2, 2, 0, 0, 0, FALSE, VECTOR_ALL_OBJECTS);
   m_LEADVector1.ForceRepaint();
   AfxMessageBox("wait");
   m_LEADVector1.EnableUndo(TRUE);
   m_LEADVector1.Undo(0);
   m_LEADVector1.ForceRepaint();


EnumGroups example for C++ 4.0 and later

   //enum the groups
   m_LEADVector1.EnumGroups();

void CMfcvecgrpDlg::OnVectorGroupsLeadvectorctrl1(LPDISPATCH pGroup)
{
   CString szOut;
   CString szTmp;
   CLEADVectorGroup Group;

   Group.AttachDispatch(pGroup);
   szTmp.Format("GroupID=%d\n", Group.GetId());
   szOut = szTmp;
   szTmp.Format("GroupName=%s\n", Group.GetName());
   szOut = szOut + szTmp;
   szTmp.Format("GroupTag=%d", Group.GetUserTag());
   szOut = szOut + szTmp;
   AfxMessageBox(szOut);
   //enum each object in the group
   Group.EnumObjects(0);
   Group.DetachDispatch();
}


EnumLayers example for C++ 4.0 and later

//enumerate all layers
   m_LEADVector1.EnumLayers();

void CVec12mfcDlg::OnVectorLayersLeadvectorctrl1(LPDISPATCH pLayer)
{
   CLEADVectorLayer Layer(pLayer);
   CString csOut;
   //display some info about each layer
   csOut.Format("Layer = %s ID = %d  Handle = %d",
                Layer.GetName(), Layer.GetId(), Layer.GetId());
   AfxMessageBox(csOut);
   Layer.EnumObjects(0); //enum all objects in this layer
   Layer.DetachDispatch();
}

void CVec12mfcDlg::OnVectorObjectsLeadvectorctrl1(LPDISPATCH pObject)
{
   CLEADVectorObject Object(pObject);
   CString csOut;
   //Display some info about the object
   csOut.Format("Object ID = %d In Layer:%d Type = %d\n",
                Object.GetId(), Object.GetLayer(),
                Object.GetType());
   OutputDebugString(csOut);
   Object.DetachDispatch();
}


EnumObjects example for C++ 4.0 and later

   m_LEADVector1.SetAutoRepaint(FALSE);
   //enumerate all objects, and select them individually
   m_LEADVector1.EnumObjects(0);
   m_LEADVector1.SetAutoRepaint(TRUE);

void CVec12mfcDlg::OnVectorObjectsLeadvectorctrl1(LPDISPATCH pObject)
{
   CLEADVectorObject Object(pObject);
   //manual delete of all selected objects
   if(Object.GetSelected)
      Object.Delete();
   Object.DetachDispatch();
}


EnumVertices example for C++ 4.0 and later

   //enumerate all vertices in vector image
   m_List1.ResetContent();
   gVertex = 0;
   m_LEADVector1.SetStopEnum(FALSE);
   m_LEADVector1.EnumVertices(0);

void CVec12mfcDlg::OnVectorVerticesLeadvectorctrl1(double X, double Y, double Z)
{
   CString csOut;

   csOut.Format("%0.3f - %0.3f - %0.3f", X, Y, Z);
   m_List1.AddString(csOut);
   //stop after the 100th vertex
   gVertex++;
   if(gVertex > 100)
      m_LEADVector1.SetStopEnum(TRUE);
}


ExplodeObjects example for C++ 4.0 and later

   //explode all objects
   m_LEADVector1.ExplodeObjects(0);


FontMapper example for C++ 4.0 and later

void CVectestDlg::OnFontMapperLeadvectorctrl1()
{
   COleFont myFont = m_LEADVector1.GetSubstitutedFont();
   CY size = myFont.GetSize();
   size.Hi = 0;
   size.Lo = 9*10000L; //9 point
   myFont.SetSize(size);
}


GetActiveLayer example for C++ 4.0 and later

   CLEADVectorLayer ActiveLayer;
   ActiveLayer = m_LEADVector1.GetActiveLayer();


GetGroupByIndex example for C++ 4.0 and later

   CLEADVectorGroup NewGroup;
   long x;
   //enum all objects in each group
   if(m_LEADVector1.GetGroupCount() > 0)
   {
      for(x=0; x<m_LEADVector1.GetGroupCount(); x++)
      {
         NewGroup = m_LEADVector1.GetGroupByIndex(0);
         NewGroup.EnumObjects(0);
         NewGroup.ReleaseDispatch();
         NewGroup.DetachDispatch();
      }
   }


GetLayerByIndex example for C++ 4.0 and later

CLEADVectorLayer Layer;
   Layer = m_LEADVector1.GetLayerByIndex(0);
   //lock layer 0
   Layer.SetLocked(TRUE);
   //enumerate all layers
   m_LEADVector1.EnumLayers();

void CVec12mfcDlg::OnVectorLayersLeadvectorctrl1(LPDISPATCH pLayer)
{
   CLEADVectorLayer Layer(pLayer);
   //empty out all visible layers that are not locked
   if(Layer.GetVisible() && !Layer.GetLocked())
      Layer.Empty();
   Layer.DetachDispatch();
}


GetObjectsParallelogram example for C++ 4.0 and later

   CString csOut;

   m_List1.ResetContent();
   if(m_LEADVector1.IsAnObjectSelected)
      m_LEADVector1.GetObjectsParallelogram(VECTOR_SELECTED_OBJECTS);
   else
      m_LEADVector1.GetObjectsParallelogram(VECTOR_ALL_OBJECTS);

   csOut.Format("LeftTopX: %0.3f", m_LEADVector1.GetObjectParallelogramLeftTopX());
   m_List1.AddString(csOut);
   csOut.Format("LeftTopY: %0.3f", m_LEADVector1.GetObjectParallelogramLeftTopY());
   m_List1.AddString(csOut);
   csOut.Format("LeftTopZ: %0.3f", m_LEADVector1.GetObjectParallelogramLeftTopZ());
   m_List1.AddString(csOut);

   csOut.Format("RightBottomX: %0.3f", m_LEADVector1.GetObjectParallelogramRightBottomX());
   m_List1.AddString(csOut);
   csOut.Format("RightBottomY: %0.3f", m_LEADVector1.GetObjectParallelogramRightBottomY());
   m_List1.AddString(csOut);
   csOut.Format("RightBottomZ: %0.3f", m_LEADVector1.GetObjectParallelogramRightBottomZ());
   m_List1.AddString(csOut);


GetObjectRect example for C++ 4.0 and later
GetObjectsRect example for C++ 4.0 and later

   CString csOut;

   m_List1.ResetContent();
   if(m_LEADVector1.IsAnObjectSelected)
      m_LEADVector1.GetObjectsRect(VECTOR_SELECTED_OBJECTS);
   else
      m_LEADVector1.GetObjectsRect(VECTOR_ALL_OBJECTS);

   csOut.Format("Left: %0.3f", m_LEADVector1.GetObjectRectLeft());
   m_List1.AddString(csOut);
   csOut.Format("Top: %0.3f", m_LEADVector1.GetObjectRectTop());
   m_List1.AddString(csOut);
   csOut.Format("Width: %0.3f", m_LEADVector1.GetObjectRectWidth());
   m_List1.AddString(csOut);
   csOut.Format("Height: %0.3f", m_LEADVector1.GetObjectRectHeight());
   m_List1.AddString(csOut);


HitTestDistance example for C++ 4.0 and later

   m_LEADVector1.SetHitTestDistance(5);
   m_LEADVector1.SetHitTestFlags(VECTOR_HITTEST_IGNORESELECTED);


HitTestDlgFlags example for C++ 4.0 and later

m_LEADVector1.SetHitTestDlgDistance(m_LEADVector1.GetHitTestDistance());
   m_LEADVector1.SetHitTestDlgFlags(m_LEADVector1.GetHitTestFlags());
   m_LEADVector1.ShowHitTestDlg(VECTOR_DLG_AUTOPROCESS);


ILEADVectorGroup::Delete example for C++ 4.0 and later

   CLEADVectorGroup TheGroup;
   //delete the first group and all of it's clones
   if(m_LEADVector1.GetGroupCount() > 0)
   {
      TheGroup = m_LEADVector1.GetGroupByIndex(0);
      TheGroup.DeleteClones(0);
      TheGroup.Delete();
   }


ILEADVectorGroup::Empty example for C++ 4.0 and later

   //empty all objects from all groups
   CLEADVectorGroup Group;
   long X;
   if(m_LEADVector1.GetGroupCount() > 0)
   {
      for(X=0; X<m_LEADVector1.GetGroupCount(); X++)
      {
         Group = m_LEADVector1.GetGroupByIndex(0);
         Group.Empty();
         Group.ReleaseDispatch();
         Group.DetachDispatch();
      }
   }


ILEADVectorLayer::Delete example for C++ 4.0 and later

CLEADVectorLayer ActiveLayer;
   ActiveLayer = m_LEADVector1.GetActiveLayer();
   ActiveLayer.Delete();


ILEADVectorObject::Bitmap example for C++ 4.0 and later

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_RASTER);
   NewObject.SetUserTag(99); //set a user tag

   NewObject.SetX(0, 3.0f);
   NewObject.SetY(0, 3.0f);
   NewObject.SetZ(0, 0.0f);

   NewObject.SetX(1, 1.0f);
   NewObject.SetY(1, 1.0f);
   NewObject.SetZ(1, 0.0f);

   NewObject.SetBitmap(m_LEAD1.GetBitmap());

   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");


ILEADVectorObject::BrushStyle example for C++ 4.0 and later

void SetBrushAndBitmapProperties(VectorBrushStyles VectorBrushStyle, BOOL bExtendedPen)

{

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_ELLIPSE);
   NewObject.SetUserTag(99); //set a user tag
   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 1.0f);
if (!bExtendedPen)
{
   NewObject.SetEnableExtendedPen(FALSE);
   NewObject.SetLogicalPenColor(RGB(255,0,0));
   NewObject.SetLogicalPenStyle(VECTOR_PS_SOLID);
   NewObject.SetLogicalPenWidth(5);
}
else
{
  NewObject.SetEnableExtendedPen(TRUE);
  NewObject.SetExtendedLogicalPenStyle(PS_SOLID|PS_ENDCAP_FLAT|PS_JOIN_BEVEL);
   NewObject.SetExtendedLogicalPenWidth(2);
   NewObject.SetExtendedLogicalPenBrushStyle(BS_SOLID);
   NewObject.SetExtendedLogicalPenColor(RGB(255,0,0));
   NewObject.SetExtendedLogicalPenHatch(0);
   NewObject.SetExtendedLogicalPenEntriesNumber(0);
}
switch(VectorBrushStyle)
{
   case VECTOR_BRUSH_STANDARD:
   NewObject.SetBrushStyle(VECTOR_BRUSH_STANDARD);
   NewObject.SetStandardBrushStyle(VECTOR_BS_HATCHED);
   NewObject.SetStandardBrushColor(RGB(0,0,255));
   NewObject.SetStandardBrushHatch(VECTOR_HS_HORIZONTAL);
   break;
   case VECTOR_BRUSH_HATCH:
   NewObject.SetBrushStyle (VECTOR_BRUSH_HATCH);
   NewObject.SetHatchBrushStyle (VECTOR_HATCH_BRUSH_LINE);
   NewObject.SetHatchBrushPenColor(RGB(255,0,0));
   NewObject.SetHatchBrushPenStyle(VECTOR_PS_DASH);
   NewObject.SetHatchBrushPenWidth(1);
   NewObject.SetHatchBrushBrushStyle(VECTOR_BS_SOLID);
   NewObject.SetHatchBrushBrushColor(RGB(0,255,0));
   NewObject.SetHatchBrushBrushHatch(0);
   NewObject.SetHatchBrushStepSize(15);
   NewObject.SetHatchBrushLineRotation(30);
   NewObject.SetHatchBrushFlags(0);
   NewObject.SetHatchBrushPointCount(0);
   break;
   case VECTOR_BRUSH_PATTERN:
   NewObject.SetBrushStyle (VECTOR_BRUSH_PATTERN);
   NewObject.SetPatternBrushBitmap (m_LEAD1.GetBitmapBitmapproperty@ltocxn.hlp());
   break;

   case VECTOR_BRUSH_GRADIENT:
   NewObject.SetBrushStyle (VECTOR_BRUSH_GRADIENT);
   NewObject.SetGradientBrushStartColor(RGB(0,0,0));
   NewObject.SetGradientBrushEndColor(RGB(192,192,192));
   NewObject.SetGradientBrushSteps (30);
   NewObject.SetGradientBrushStyle(VECTOR_GRADIENT_LINE_L_TO_R);
   break;

}
   NewObject.SetRadiusX(1);
   NewObject.SetRadiusY(1);
   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");

}


ILEADVectorObject::Delete example for C++ 4.0 and later

   m_LEADVector1.SetAutoRepaint(FALSE);
   //enumerate all objects, and select them individually
   m_LEADVector1.EnumObjects(VECTOR_FLAGS_SELECTED_ONLY);
   m_LEADVector1.SetAutoRepaint(TRUE);

void CVec12mfcDlg::OnVectorObjectsLeadvectorctrl1(LPDISPATCH pObject)
{
   CLEADVectorObject Object(pObject);
   //manual delete of all selected objects
   if(Object.GetSelected)
      Object.Delete();
   Object.DetachDispatch();
}


ILEADVectorObject::DllName example for C++ 4.0 and later

   short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_STOCK);
   NewObject.SetUserTag(99); //set a user tag

   NewObject.SetX(0, 3.0f);
   NewObject.SetY(0, 3.0f);
   NewObject.SetZ(0, 0.0f);

   NewObject.SetX(1, 1.0f);
   NewObject.SetY(1, 1.0f);
   NewObject.SetZ(1, 0.0f);

   NewObject.SetPenColor(RGB(255,0,0));
   NewObject.SetPenStyle(VECTOR_PS_SOLID);
   NewObject.SetPenWidth(1);

   NewObject.SetBrushStyle(VECTOR_BS_SOLID);
   NewObject.SetBrushColor(RGB(0,255,0));
   NewObject.SetBrushHatch(0);

   NewObject.SetHDllInst((long)LoadLibrary("vecofice.dll"));
   NewObject.SetDllName("");//use the dll instance instead of the name
   NewObject.SetStockID(15);

   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");


ILEADVectorObject::Explode example for C++ 4.0 and later

m_LEADVector1.SetAutoRepaint(FALSE);
   //enumerate all objects, and explode them individually
   m_LEADVector1.EnumObjects(0);
   m_LEADVector1.SetAutoRepaint(TRUE);

void CVec12mfcDlg::OnVectorObjectsLeadvectorctrl1(LPDISPATCH pObject)
{
   CLEADVectorObject Object(pObject);
   //Manually explode each object
   Object.Explode();
   Object.DetachDispatch();
}


ILEADVectorObject::Flags example for C++ 4.0 and later

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_TEXT);
   NewObject.SetUserTag(99); //set a user tag
   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 0.0f);

   NewObject.SetPenColor(RGB(255,0,0));
   NewObject.SetPenStyle(VECTOR_PS_SOLID);
   NewObject.SetPenWidth(5);

   NewObject.SetText("LEADTOOLS!");
   NewObject.SetFlags(VECTOR_TEXT_HCENTER | VECTOR_TEXT_VCENTER);
   NewObject.SetCharHeight(8);
   NewObject.SetCharWidth(8);
   NewObject.SetFontHeight(0);
   NewObject.SetFontWidth(0);
   NewObject.SetFontOrientation(450);
   NewObject.SetFontEscapement(450);
   NewObject.SetFontUnderline(TRUE);
   NewObject.SetFontItalic(TRUE);
   NewObject.SetFontStrikeOut(TRUE);
   NewObject.SetFontFaceName("Arial");
   NewObject.SetFontPitchAndFamily(0);
   NewObject.SetFontQuality(0);
   NewObject.SetFontClipPrecision(0);
   NewObject.SetFontOutPrecision(0);
   NewObject.SetFontCharSet(0);

   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");


ILEADVectorObject::Hidden example for C++ 4.0 and later

void Leadvectorctrl1::OnMouseUp (short Button, short Shift, float x, float y) {   BOOL bRet;   CLEADVectorObject CurrentObject;      bRet = m_LEADVector1.HitTest(x, y);   if(bRet)   {      CurrentObject = m_LEADVector1.GetCurrentObject();      CurrentObject.SetHidden (TRUE);      m_LEADVector1.ForceRepaint();   }}


ILEADVectorObject::PointCount example for C++ 4.0 and later

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_POLYGON);
   NewObject.SetUserTag(99); //set a user tag

   NewObject.SetPointCount(3);
   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 0.0f);

   NewObject.SetX(1, 4.0f);
   NewObject.SetY(1, 1.0f);
   NewObject.SetZ(1, 0.0f);

   NewObject.SetX(2, 0.0f);
   NewObject.SetY(2, 0.0f);
   NewObject.SetZ(2, 0.0f);

   NewObject.SetPolyFillMode(VECTOR_POLY_WINDING);

   NewObject.SetPenColor(RGB(255,0,0));
   NewObject.SetPenStyle(VECTOR_PS_SOLID);
   NewObject.SetPenWidth(5);
   NewObject.SetBrushStyle(VECTOR_BS_HATCHED);
   NewObject.SetBrushColor(RGB(0,0,255));
   NewObject.SetBrushHatch(VECTOR_HS_HORIZONTAL);
   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");


ILEADVectorObject::PointType example for C++ 4.0 and later

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_POLYDRAW);
   NewObject.SetUserTag(99); //set a user tag

   NewObject.SetPointCount(4);

   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 0.0f);
   NewObject.SetPointType(0, VECTOR_PT_MOVETO);

   NewObject.SetX(1, 4.0f);
   NewObject.SetY(1, 1.0f);
   NewObject.SetZ(1, 0.0f);
   NewObject.SetPointType(1, VECTOR_PT_LINETO);

   NewObject.SetX(2, 4.0f);
   NewObject.SetY(2, 3.0f);
   NewObject.SetZ(2, 0.0f);
   NewObject.SetPointType(2, VECTOR_PT_LINETO);

   NewObject.SetX(3, 3.0f);
   NewObject.SetY(3, 5.0f);
   NewObject.SetZ(3, 0.0f);
   NewObject.SetPointType(3, VECTOR_PT_LINETO);

   NewObject.SetPenColor(RGB(255,0,0));
   NewObject.SetPenStyle(VECTOR_PS_SOLID);
   NewObject.SetPenWidth(5);

   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");


ILEADVectorObject::SectionsNumber example for C++ 4.0 and later

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject( VECTOR_HPOLYBEZIER);
   NewObject.SetUserTag(99); //set a user tag
   NewObject.SetSectionsNumber(1);
   NewObject.SetDegree(0,2);
   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 1.0f);
   NewObject.SetX(1, 100.0f);
   NewObject.SetY(1, 1.0f);
   NewObject.SetZ(1, 1.0f);
   NewObject.SetX(2, 100.0f);
   NewObject.SetY(2, 100.0f);
   NewObject.SetZ(2, 1.0f);
   NewObject.SetEnableExtendedPen(FALSE);
   NewObject.SetLogicalPenColor(RGB(255,0,0));
   NewObject.SetLogicalPenStyle(VECTOR_PS_SOLID);
   NewObject.SetLogicalPenWidth(5);
   NewObject.SetBrushStyle(VECTOR_BRUSH_STANDARD);
   NewObject.SetStandardBrushStyle(VECTOR_BS_HATCHED);
   NewObject.SetStandardBrushColor(RGB(0,0,255));
   NewObject.SetStandardBrushHatch(VECTOR_HS_HORIZONTAL);
   NewObject.SetRadiusX(1);
   NewObject.SetRadiusY(1);
   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");


ILEADVectorObject::StartAngle example for C++ 4.0 and later

short nRet;
   CLEADVectorObject NewObject;
   CLEADVectorLayer NewLayer;

   nRet = m_LEADVector1.AddLayer("My Layer", TRUE, FALSE, 0, 0);
   if(nRet != 0)
      AfxMessageBox("Can't Add Layer!");

   //add a new object
   NewObject = m_LEADVector1.AddNewObject(VECTOR_PIE);
   NewObject.SetUserTag(99); //set a user tag
   NewObject.SetX(0, 1.0f);
   NewObject.SetY(0, 1.0f);
   NewObject.SetZ(0, 1.0f);
   NewObject.SetPenColor(RGB(255,0,0));
   NewObject.SetPenStyle(VECTOR_PS_SOLID);
   NewObject.SetPenWidth(5);
   NewObject.SetBrushStyle(VECTOR_BS_HATCHED);
   NewObject.SetBrushColor(RGB(0,0,255));
   NewObject.SetBrushHatch(VECTOR_HS_HORIZONTAL);
   NewObject.SetRadiusX(1);
   NewObject.SetStartAngle(45);
   NewObject.SetSweepAngle(45);
   NewLayer = m_LEADVector1.GetLayerByName("My Layer");
   nRet = NewObject.Insert(NewLayer.GetId());
   if(nRet != 0)
      AfxMessageBox("Can't Insert Object!");


InvertColors example for C++ 4.0 and later

void CVectorView::OnOptionsInvertcolors()
{
m_LEADVector1.InvertColors ( );
}


Is3D example for C++ 4.0 and later

if(m_LEADVector1.Is3D())
      AfxMessageBox("Vector is 3D");
   //free it
   m_LEADVector1.Free();


IsAnObjectHidden example for C++ 4.0 and later

if( m_LEADVector1.IsAnObjectHidden() )
    AfxMessageBox( "Some objects are hidden" );
else
    AfxMessageBox( "No objects is hidden" );


IsObjectsInsideParallelogram example for C++ 4.0 and later

   BOOL bRet;
   bRet = m_LEADVector1.IsObjectsInsideParallelogram(-50, -50, -50, 50, 50, 50, VECTOR_FLAGS_SELECTED_ONLY);
   if(bRet)
      AfxMessageBox("Yes");


IsObjectsInsideRect example for C++ 4.0 and later

   BOOL bRet;
   bRet = m_LEADVector1.IsObjectsInsideRect(0, 0, 500, 500, 0);
   if(bRet)
      AfxMessageBox("Yes");


KeyDown example for C++ 4.0 and later

void CVectestDlg::OnKeyDownLeadvectorctrl1(short KeyCode, short Shift)
{
   AfxMessageBox("KeyDown");
}


KeyPress example for C++ 4.0 and later

void CVectestDlg::OnKeyPressLeadvectorctrl1(short KeyAscii)
{
   AfxMessageBox("KeyPress");
}


KeyUp example for C++ 4.0 and later

void CVectestDlg::OnKeyUpLeadvectorctrl1(short KeyCode, short Shift)
{
   AfxMessageBox("KeyUp");
}


LayerCount example for C++ 4.0 and later

   CString csOut;
   csOut.Format("Layers = %d", m_LEADVector1.GetLayerCount());
   AfxMessageBox(csOut);


Load example for C++ 4.0 and later

short nRet;
   //load a vector image
   m_LEADVector1.SetBackColor(RGB(0, 0, 0));
   m_LEADVector1.SetBackErase(TRUE);
   m_LEADVector1.SetAutoRepaint(FALSE);
   nRet = m_LEADVector1.Load("s:\\temp\\images\\dxf\\test.dxf");
   if(nRet != 0)
   {
      CString csOut;
      csOut.Format("Error #%d", nRet);
      AfxMessageBox(csOut);
   }
   else
   {
      m_LEADVector1.ForceRepaint();
      m_LEADVector1.SetAutoRepaint(TRUE);
   }


LoadMemory example for C++ 4.0 and later

long hMem;
   long iSize;

   if(m_LEADVector1.SaveMemory(&hMem, FILE_DXF, &iSize) != 0)
      AfxMessageBox("Error calling SaveMemory");
   else
   {
      m_LEADVector1.Free();
      AfxMessageBox("wait");
      if(m_LEADVector1.LoadMemory(hMem, iSize) != 0)
         AfxMessageBox("Error calling LoadMemory");
      //free the memory
      GlobalFree((HANDLE)hMem);
   }


Locked example for C++ 4.0 and later

   //Check if locked
   if(m_LEADVector1.GetLocked())
   {
      AfxMessageBox("Vector was locked");
      m_LEADVector1.SetLocked(FALSE);
   }
   else
   {
      AfxMessageBox("Vector was not locked");
      m_LEADVector1.SetLocked(TRUE);
   }


LogicalToPhysical example for C++ 4.0 and later

//convert from logical to physcial
   m_LEADVector1.LogicalToPhysical(-2.2f, 3.1f, -3.2f);
   CString csOut;
   csOut.Format("X: %f  Y: %f", m_LEADVector1.GetPhysicalX(), m_LEADVector1.GetPhysicalY());
   AfxMessageBox(csOut);


MarkerPenStyle example for C++ 4.0 and later

   m_LEADVector1.SetMarkerPenStyle(MARKER_PS_DASHDOTDOT);
   m_LEADVector1.SetMarkerPenWidth(1);
   m_LEADVector1.SetMarkerPenColor(RGB(255,0,0));
   m_LEADVector1.SetMarkerBrushStyle(MARKER_BS_HATCHED);
   m_LEADVector1.SetMarkerBrushColor(RGB(0,0,255));
   m_LEADVector1.SetMarkerBrushHatch(MARKER_HS_VERTICAL);


MouseDown example for C++ 4.0 and later

void CVectestDlg::OnMouseDownLeadvectorctrl1(short Button, short Shift, float x, float y)
{
   SetWindowText("MouseDown");
}

void CVectestDlg::OnMouseMoveLeadvectorctrl1(short Button, short Shift, float x, float y)
{
   CString csOut;
   csOut.Format("X: %ld - Y: %ld", (long)x, (long)y);
   SetWindowText(csOut);
}


MousePointer example for C++ 4.0 and later

m_LEADVector1.SetMousePointer(5); // four-pointed arrow


MouseUp example for C++ 4.0 and later

void CVectestDlg::OnMouseUpLeadvectorctrl1(short Button, short Shift, float x, float y)
{
   BOOL bRet;
   CLEADVectorObject CurrentObject;

   bRet = m_LEADVector1.HitTest(x, y);
   if(bRet)
   {
      CurrentObject = m_LEADVector1.GetCurrentObject();
      CurrentObject.SetSelected(TRUE);
      m_LEADVector1.ForceRepaint();
   }
}


NewLayerDlgName example for C++ 4.0 and later

   CString csOut;
   csOut.Format("%d", m_LEADVector1.GetLayerCount());
   AfxMessageBox(csOut);
   m_LEADVector1.SetNewLayerDlgName ("TestLayer");
   m_LEADVector1.SetNewLayerDlgVisible(TRUE);
   m_LEADVector1.SetNewLayerDlgLocked(FALSE);
   m_LEADVector1.SetNewLayerDlgUserTag(100);
   m_LEADVector1.SetNewLayerDlgActiveLayer(FALSE);
   m_LEADVector1.ShowNewLayerDlg(VECTOR_DLG_AUTOPROCESS);
   csOut.Format("%d", m_LEADVector1.GetLayerCount());
   AfxMessageBox(csOut);


ObjectParallelogramLeft example for C++ 4.0 and later

CString csOut;

   m_List1.ResetContent();
   if(m_LEADVector1.IsAnObjectSelected())
       m_LEADVector1.GetObjectsParallelogram(VECTOR_SELECTED_OBJECTS);
   else
       m_LEADVector1.GetObjectsParallelogram(VECTOR_ALL_OBJECTS);

   csOut.Format("LeftTopX: %f", m_LEADVector1.GetObjectParallelogramLeftTopX());
   m_List1.AddString(csOut);
   csOut.Format("LeftTopY: %f", m_LEADVector1.GetObjectParallelogramLeftTopY());
   m_List1.AddString(csOut);
   csOut.Format("LeftTopZ: %f", m_LEADVector1.GetObjectParallelogramLeftTopZ());

   csOut.Format("RightBottomX: %f", m_LEADVector1.GetObjectParallelogramRightBottomX());
   m_List1.AddString(csOut);
   csOut.Format("RightBottomY: %f", m_LEADVector1.GetObjectParallelogramRightBottomY());
   m_List1.AddString(csOut);
   csOut.Format("RightBottomZ: %f", m_LEADVector1.GetObjectParallelogramRightBottomZ());


PanX example for C++ 4.0 and later

   //pan image down and right
   m_LEADVector1.SetAutoScroll(FALSE);
   m_LEADVector1.SetPanX(m_LEADVector1.GetPanX() - 10);
   m_LEADVector1.SetPanY(m_LEADVector1.GetPanY() - 10);


ParallelogramMinX example for C++ 4.0 and later

   CString szOut;
   CString szTemp;

   szTemp.Format("MinX = %0.3f\n", m_LEADVector1.GetParallelogramMinX());
   szOut = szTemp;
   szTemp.Format("MinY = %0.3f\n", m_LEADVector1.GetParallelogramMinY());
   szOut = szOut + szTemp;
   szTemp.Format("MinZ = %0.3f\n", m_LEADVector1.GetParallelogramMinZ());
   szOut = szOut + szTemp;

   szTemp.Format("MaxX = %0.3f\n", m_LEADVector1.GetParallelogramMaxX());
   szOut = szOut + szTemp;
   szTemp.Format("MaxY = %0.3f\n", m_LEADVector1.GetParallelogramMaxY ());
   szOut = szOut + szTemp;
   szTemp.Format("MaxZ = %0.3f", m_LEADVector1.GetParallelogramMaxZ());
   szOut = szOut + szTemp;

   AfxMessageBox(szOut);

   m_LEADVector1.SetParallelogramMinX(0);
   m_LEADVector1.SetParallelogramMinY(0);
   m_LEADVector1.SetParallelogramMinZ(0);
   m_LEADVector1.SetParallelogramMaxX(100);
   m_LEADVector1.SetParallelogramMaxY(100);
   m_LEADVector1.SetParallelogramMaxZ(100);

   szTemp.Format("MinX = %0.3f\n", m_LEADVector1.GetParallelogramMinX());
   szOut = szTemp;
   szTemp.Format("MinY = %0.3f\n", m_LEADVector1.GetParallelogramMinY());
   szOut = szOut + szTemp;
   szTemp.Format("MinZ = %0.3f\n", m_LEADVector1.GetParallelogramMinZ());
   szOut = szOut + szTemp;

   szTemp.Format("MaxX = %0.3f\n", m_LEADVector1.GetParallelogramMaxX());
   szOut = szOut + szTemp;
   szTemp.Format("MaxY = %0.3f\n", m_LEADVector1.GetParallelogramMaxY());
   szOut = szOut + szTemp;
   szTemp.Format("MaxZ = %0.3f", m_LEADVector1.GetParallelogramMaxZ());
   szOut = szOut + szTemp;

   AfxMessageBox(szOut);


PhysicalToLogical example for C++ 4.0 and later

void CVec12mfcDlg::OnMouseMoveLeadvectorctrl1(short Button, short Shift, double X, double Y)
{
   CString csOut;
   LEADVector1.PhysicalToLogical x, y
   csOut.Format("(%0.3f,%0.3f,%0.3f)\n",
                           m_LEADVector1.GetLogicalX(),
                           m_LEADVector1.GetLogicalY(),
                           m_LEADVector1.GetLogicalZ());
   OutputDebugString(csOut);
}


Polygon example for C++ 4.0 and later
PolygonMode example for C++ 4.0 and later

//show all polygon modes
   m_LEADVector1.SetPolygonMode(VECTOR_POLYGON_POINT);
   AfxMessageBox("wait");
   m_LEADVector1.SetPolygonMode(VECTOR_POLYGON_LINE);
   AfxMessageBox("wait");
   m_LEADVector1.SetPolygonMode(VECTOR_POLYGON_FILL);
   AfxMessageBox("wait");


Realize example for C++ 4.0 and later

//create canvas bitmap
   m_LEAD1.CreateBitmap(400.0f, 400.0f, 24);
   m_LEAD1.Fill(m_LEADVector1.GetBackColor());
   //realize the vecto to the bitmap
   m_LEADVector1.Realize(m_LEAD1.GetBitmap(), TRUE);


Redo example for C++ 4.0 and later

   if(m_LEADVector1.CanRedo())
      m_LEADVector1.Redo(0);


RenderDlgUseLights example for C++ 4.0 and later

   m_LEADVector1.SetRenderDlgAmbientColor(m_LEADVector1.GetAmbientColor());
   m_LEADVector1.SetRenderDlgPolygonMode(m_LEADVector1.GetPolygonMode());
   m_LEADVector1.SetRenderDlgUseLights(m_LEADVector1.GetUseLights());
   m_LEADVector1.ShowRenderDlg(VECTOR_DLG_AUTOPROCESS | VECTOR_DLG_SHOWPREVIEW);


Render example for C++ 4.0 and later

   long hDC;
   long nWidth = 2000;
   long nHeight = 2000;

      hDC = m_LEADVector1.PrintStart();
      //you can specify the location and size
      m_LEADVector1.Render(hDC, 100, 100, nWidth, nHeight);
      m_LEADVector1.PrintEnd(hDC);


Reset example for C++ 4.0 and later

   //Reset the vector
   m_LEADVector1.Reset(VECTOR_RESET_ALL);


Resize example for C++ 4.0 and later

void CVectestDlg::OnResizeLeadvectorctrl1()
{
   AfxMessageBox("Resize event");
}


RotationDlgOriginX example for C++ 4.0 and later

   m_List1.ResetContent();
   m_LEADVector1.SetRotationDlgOriginX(m_LEADVector1.GetOriginX());
   m_LEADVector1.SetRotationDlgOriginY(m_LEADVector1.GetOriginY());
   m_LEADVector1.SetRotationDlgOriginZ(m_LEADVector1.GetOriginZ());
   m_LEADVector1.ShowRotateDlg(VECTOR_DLG_AUTOPROCESS | VECTOR_DLG_SHOWPREVIEW);
   CString csOut;
   csOut.Format("%0.3f", m_LEADVector1.GetRotationDlgX());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetRotationDlgY());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetRotationDlgZ());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetRotationDlgOriginX());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetRotationDlgOriginY());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetRotationDlgOriginZ());
   m_List1.AddString(csOut);


Save example for C++ 4.0 and later

   //save a DXF file
   m_LEADVector1.ApplyTransformation();
   m_LEADVector1.Save("d:\\temp\\testing.dxf", FILE_DXF);
   m_LEADVector1.Free();
   AfxMessageBox("wait");
   m_LEADVector1.Load("d:\\temp\\testing.dxf");


SaveArray example for C++ 4.0 and later

COleVariant MyVar;
   long lSize;

   MyVar.Clear ();
   MyVar = m_LEADVector1.SaveArray(FILE_DXF);
   lSize = m_LEADVector1.ArraySize(&MyVar);

   m_LEADVector1.Free();
   AfxMessageBox("wait");
   m_LEADVector1.LoadArray(&MyVar, lSize);


ScaleDlgOriginX example for C++ 4.0 and later

   m_List1.ResetContent();
   m_LEADVector1.SetScaleDlgOriginX(m_LEADVector1.GetOriginX());
   m_LEADVector1.SetScaleDlgOriginY(m_LEADVector1.GetOriginY());
   m_LEADVector1.SetScaleDlgOriginZ(m_LEADVector1.GetOriginZ());
   m_LEADVector1.ShowScaleDlg(VECTOR_DLG_AUTOPROCESS | VECTOR_DLG_SHOWPREVIEW);
   CString csOut;
   csOut.Format("%0.3f", m_LEADVector1.GetScaleDlgX());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetScaleDlgY());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetScaleDlgZ());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetScaleDlgOriginX());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetScaleDlgOriginY());
   m_List1.AddString(csOut);
   csOut.Format("%0.3f", m_LEADVector1.GetScaleDlgOriginZ());
   m_List1.AddString(csOut);


ScaleHeight example for C++ 4.0 and later

ScaleHeight has been removed.


ScaleMode example for C++ 4.0 and later

CString csOut;

   m_LEADVector1.SetScaleMode(3); //set to pixels
   m_List1.ResetContent();
   if(m_LEADVector1.IsAnObjectSelected())
      m_LEADVector1.GetObjectsRect(VECTOR_SELECTED_OBJECTS);
   else
      m_LEADVector1.GetObjectsRect(VECTOR_ALL_OBJECTS);
   csOut.Format("Left: %f", m_LEADVector1.GetObjectRectLeft());
   m_List1.AddString(csOut);
   csOut.Format("Top: %f", m_LEADVector1.GetObjectRectTop());
   m_List1.AddString(csOut);
   csOut.Format("Width: %f", m_LEADVector1.GetObjectRectWidth());
   m_List1.AddString(csOut);
   csOut.Format("Height: %f", m_LEADVector1.GetObjectRectHeight());
   m_List1.AddString(csOut);


SelectAllObjects example for C++ 4.0 and later

   //select all objects
   m_LEADVector1.SelectAllObjects(TRUE);
   AfxMessageBox("wait");
   if(m_LEADVector1.IsAnObjectSelected())
      //deselect all objects
      m_LEADVector1.SelectAllObjects(FALSE);


SetDlgString example for C++ 4.0 and later

CString Title;

   Title = m_LEADVector1.GetDlgString(VECTOR_DLGSTRING_TRANSFORM_SCALE_CAPTION);
   AfxMessageBox("OldValue: " + Title);

   //set some custom strings
   m_LEADDlg1.SetDlgString(VECTOR_DLGSTRING_TRANSFORM_SCALE_CAPTION, "My Custom Title");


SetRotation example for C++ 4.0 and later

CString csOut;
   csOut.Format("Before: X=%f Y=%f Z=%f",
                m_LEADVector1.GetRotationX(),
                m_LEADVector1.GetRotationY(),
                m_LEADVector1.GetRotationZ());
   AfxMessageBox(csOut);
   m_LEADVector1.SetAutoRepaint(TRUE);
   m_LEADVector1.SetRotation(10.0f, 10.0f, -10.0f,
                             0.0f, 0.0f, 0.0f,
                             FALSE, VECTOR_ALL_OBJECTS);
   csOut.Format("After: X=%f Y=%f Z=%f",
                m_LEADVector1.GetRotationX(),
                m_LEADVector1.GetRotationY(),
                m_LEADVector1.GetRotationZ());
   AfxMessageBox(csOut);


SetScaling example for C++ 4.0 and later

CString csOut;
   csOut.Format("Before: X=%f Y=%f Z=%f",
                m_LEADVector1.GetScalingX(),
                m_LEADVector1.GetScalingY(),
                m_LEADVector1.GetScalingZ());
   AfxMessageBox(csOut);
   m_LEADVector1.SetAutoRepaint(TRUE);
   m_LEADVector1.SetScaling(2.0f, 2.0f, 2.0f,
                            0.0f, 0.0f, 0.0f,
                            FALSE, VECTOR_ALL_OBJECTS);
   csOut.Format("After: X=%f Y=%f Z=%f",
                m_LEADVector1.GetScalingX(),
                m_LEADVector1.GetScalingY(),
                m_LEADVector1.GetScalingZ());
   AfxMessageBox(csOut);


SetTranslation example for C++ 4.0 and later

CString csOut;
   csOut.Format("Before: X=%f Y=%f Z=%f",
                m_LEADVector1.GetTranslationX(),
                m_LEADVector1.GetTranslationY(),
                m_LEADVector1.GetTranslationZ());
   AfxMessageBox(csOut);
   m_LEADVector1.SetAutoRepaint(TRUE);
   m_LEADVector1.SetTranslation(3.0f, 3.0f, -3.0f, VECTOR_ALL_OBJECTS);
   csOut.Format("After: X=%f Y=%f Z=%f",
                m_LEADVector1.GetTranslationX(),
                m_LEADVector1.GetTranslationY(),
                m_LEADVector1.GetTranslationZ());
   AfxMessageBox(csOut);


Show3DOptions example for C++ 4.0 and later
Show3DOptionsDlg example for C++ 4.0 and later

CString csOut;
   m_List1.ResetContent();
   m_LEADVector1.Show3DOptionsDlg(VECTOR_DLG_AUTOPROCESS |
                                  VECTOR_DLG_SHOWPREVIEW );
   if(m_LEADVector1.GetDlg3DOptionsUseLights())
      m_List1.AddString("True");
   else
      m_List1.AddString("False");
   csOut.Format("%ld", m_LEADVector1.GetDlg3DOptionsAmbientColor());
   m_List1.AddString(csOut);
   csOut.Format("%d", m_LEADVector1.GetDlg3DOptionsPolygonMode());
   m_List1.AddString(csOut);


ShowCameraDlg example for C++ 4.0 and later

CString csOut;
   m_List1.ResetContent();
   m_LEADVector1.ShowCameraDlg(VECTOR_DLG_AUTOPROCESS |
                               VECTOR_DLG_SHOWPREVIEW );
   csOut.Format("%ld", m_LEADVector1.GetCameraTheta());
   m_List1.AddString(csOut);
   csOut.Format("%ld", m_LEADVector1.GetCameraPhi());
   m_List1.AddString(csOut);
   csOut.Format("%ld", m_LEADVector1.GetCameraZoom());
   m_List1.AddString(csOut);


ShowEditAllGroupsDlg example for C++ 4.0 and later

   //edit all the groups
   m_LEADVector1.ShowEditAllGroupsDlg(VECTOR_DLG_AUTOPROCESS);


ShowEditAllLayersDlg example for C++ 4.0 and later

   m_LEADVector1.ShowEditAllLayersDlg(0);


ShowEditGroupDlg example for C++ 4.0 and later

   long x;
   CLEADVectorGroup TheGroup;
   CString cs;
   //edit each group
   for(x=0; x<m_LEADVector1.GetGroupCount(); x++)
   {
      TheGroup = m_LEADVector1.GetGroupByIndex(x);
      cs.Format("GroupIndex %d before: %s", x, TheGroup.GetName());
      AfxMessageBox(cs);
      TheGroup.ReleaseDispatch();
      TheGroup.DetachDispatch();
      m_LEADVector1.ShowEditGroupDlg(x);
      TheGroup = m_LEADVector1.GetGroupByIndex(x);
      cs.Format("GroupIndex %d after: %s", x, TheGroup.GetName());
      AfxMessageBox(cs);
      TheGroup.ReleaseDispatch();
      TheGroup.DetachDispatch();
   }


ShowEditObjectDlg example for C++ 4.0 and later

void CVec12mfcDlg::OnMouseUpLeadvectorctrl1(short Button, short Shift, double X, double Y)
{
   BOOL bRet;
   bRet = m_LEADVector1.HitTest(X, Y);
   if(bRet)
      m_LEADVector1.ShowEditObjectDlg(m_LEADVector1.CurrentObject().GetHObject());
}


ShowNewObjectDlg example for C++ 4.0 and later

m_LEADVector1.ShowNewObjectDlg(VECTOR_PIE, -1);


ShowRotateDlg example for C++ 4.0 and later

CString csOut;
   m_List1.ResetContent();
   m_LEADVector1.ShowRotateDlg(VECTOR_DLG_AUTOPROCESS |
                                                           VECTOR_DLG_SHOWPREVIEW);
   csOut.Format("%f", m_LEADVector1.GetRotationDlgX());
   m_List1.AddString(csOut);
   csOut.Format("%f", m_LEADVector1.GetRotationDlgY());
   m_List1.AddString(csOut);
   csOut.Format("%f", m_LEADVector1.GetRotationDlgZ());
   m_List1.AddString(csOut);


ShowScaleDlg example for C++ 4.0 and later

CString csOut;
   m_List1.ResetContent();
   m_LEADVector1.ShowScaleDlg(VECTOR_DLG_AUTOPROCESS |
                              VECTOR_DLG_SHOWPREVIEW );
   csOut.Format("%f", m_LEADVector1.GetScaleDlgX());
   m_List1.AddString(csOut);
   csOut.Format("%f", m_LEADVector1.GetScaleDlgY());
   m_List1.AddString(csOut);
   csOut.Format("%f", m_LEADVector1.GetScaleDlgZ());
   m_List1.AddString(csOut);


ShowTranslateDlg example for C++ 4.0 and later

CString csOut;
   m_List1.ResetContent();
   m_LEADVector1.ShowTranslateDlg(VECTOR_DLG_AUTOPROCESS |
                              VECTOR_DLG_SHOWPREVIEW );
   csOut.Format("%f", m_LEADVector1.GetTranslateDlgX());
   m_List1.AddString(csOut);
   csOut.Format("%f", m_LEADVector1.GetTranslateDlgY());
   m_List1.AddString(csOut);
   csOut.Format("%f", m_LEADVector1.GetTranslateDlgZ());
   m_List1.AddString(csOut);


StartFeedLoad example for C++ 4.0 and later

#define BUFFERSIZE 60000

   VARIANT     variant;
   SAFEARRAY   *ptrsafearray;
   SAFEARRAYBOUND    arraybound;
   LPSTR       lp;   /* pointer to the data */
   /* Set up the VARIANT and the SAFEARRAY structures */
   arraybound.cElements = BUFFERSIZE;  /* 1000 bytes at a  time */
   arraybound.lLbound = 0;
   ptrsafearray = SafeArrayCreate( VT_UI1, 1, &arraybound );
   SafeArrayLock( ptrsafearray );
   lp = (LPSTR)ptrsafearray->pvData;    /* get a pointer to the buffer */

   V_VT(&variant) = VT_ARRAY | VT_UI1;
   V_ARRAY(&variant) = ptrsafearray;
   /* Now we have a variant and we can do the real work */
   HFILE    hf;
   int      bytesread;
   OFSTRUCT of;
   if( (hf = OpenFile("s:\\temp\\images\\dxf\\test.dxf", &of, OF_READ)) == HFILE_ERROR)
   {
      SafeArrayUnlock( ptrsafearray );
      SafeArrayDestroy( ptrsafearray );
      MessageBox( "Error opening file !" );
      return;
   }
   if( m_LEADVector1.StartFeedLoad() ) /* default bits per pixel and first page */ {
      SafeArrayUnlock( ptrsafearray );
      SafeArrayDestroy( ptrsafearray );
      _lclose( hf );
      MessageBox( "Error in StartFeedLoad !" );
      return;
   }

   do
   {
      bytesread = (int)_hread( hf, lp, BUFFERSIZE );
      if( m_LEADVector1.FeedLoad( &variant, bytesread ) )
      {
         SafeArrayUnlock( ptrsafearray );
         SafeArrayDestroy( ptrsafearray );
         _lclose( hf );
         MessageBox( "Error in FeedLoad !" );
         return;
      }
   } while (bytesread > 0);
   if( m_LEADVector1.StopFeedLoad() )
   {
      SafeArrayUnlock( ptrsafearray );
      SafeArrayDestroy( ptrsafearray );
      _lclose( hf );
      MessageBox( "Error in StopFeedLoad !" );
      return;
   }

   SafeArrayUnlock( ptrsafearray );
   SafeArrayDestroy( ptrsafearray );


ToolbarControl example for C++ 4.0 and later

class CMyLEADVector : public CLEADVector
{
public:
   // Generated message map functions
   //{{AFX_MSG(CMyLEADVector)
   afx_msg void OnSetFocus(CWnd* pOldWnd);
   afx_msg void OnKillFocus(CWnd* pWnd);
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()
};

BEGIN_MESSAGE_MAP(CMyLEADVector, CWnd)
   //{{AFX_MSG_MAP(CMyLEADVector)
   ON_WM_SETFOCUS()
   ON_WM_KILLFOCUS()
   //}}AFX_MSG_MAP
END_MESSAGE_MAP()

void CMyLEADVector::OnSetFocus(CWnd* pOldWnd)
{
   LPDISPATCH pToolbar=NULL;
   CVec12mfcDlg *pParent=NULL;
   if(this->GetVectorUserMode() == VECTOR_USERMODE_AUTO)
   {
      pParent = (CVec12mfcDlg*)this->GetParent();
      this->GetAutoContainer().SetActive(); //set active container
      pToolbar = (LPDISPATCH)pParent->m_LEADToolBar1.GetControlUnknown ();
      this->SetToolbarControl(pToolbar); //set toolbar
   }
}

void CMyLEADVector::OnKillFocus(CWnd* pWnd)
{
   this->SetToolbarControl(NULL); //release toolbar
}


Tooltip example for C++ 4.0 and later

void CVectorView::OnSetTooltip()
{
   if ( 0 == m_LEADVector1.GetClipMode ( ) )
       m_LEADVector1.SetClipMode ( 5 );

   m_LastSelectedObject.SetTooltip ( "This is a tooltip" );
   m_LastSelectedObject.SetTooltipPenColor ( RGB( 0xFF, 0, 0 ) );
   m_LastSelectedObject.SetTooltipPenStyle ( PS_SOLID );
   m_LastSelectedObject.SetTooltipPenWidth ( 1 );
   m_LastSelectedObject.SetTooltipBrushColor ( RGB( 0xFF, 0, 0 ) );
   m_LastSelectedObject.SetTooltipBrushStyle ( BS_SOLID );
   m_LastSelectedObject.SetTooltipBrushHatch ( 0 );
   m_LastSelectedObject.SetTooltipFontHeight ( 15 );
   m_LastSelectedObject.SetTooltipFontWidth ( 0 );
   m_LastSelectedObject.SetTooltipFontFaceName ( "Arial" );
   m_LastSelectedObject.SetTooltipFontCharSet ( 0 );
   m_LastSelectedObject.SetTooltipFontClipPrecision ( 0 );
   m_LastSelectedObject.SetTooltipFontEscapement ( 0 );
   m_LastSelectedObject.SetTooltipFontOrientation ( 0 );
   m_LastSelectedObject.SetTooltipFontItalic ( TRUE );
   m_LastSelectedObject.SetTooltipFontStrikeOut ( FALSE );
   m_LastSelectedObject.SetTooltipFontUnderline ( TRUE );
   m_LastSelectedObject.SetTooltipFontOutPrecision ( 0 );
   m_LastSelectedObject.SetTooltipFontPitchAndFamily ( 0 );
   m_LastSelectedObject.SetTooltipFontQuality ( 0 );
   m_LastSelectedObject.SetTooltipPointX ( 10 );
   m_LastSelectedObject.SetTooltipPointY ( 10 );

   m_LastSelectedObject.ShowTooltip ( TRUE );
}


Undo example for C++ 4.0 and later

   if(m_LEADVector1.CanUndo())
      m_LEADVector1.Undo(0);


UndoLevel example for C++ 4.0 and later

   m_LEADVector1.SetUndoLevel(3);


UnlockSupport example for C++ 4.0 and later

Dim bRet As Boolean

    bRet = LEADVector1.IsSupportLocked(L_SUPPORT_VECTOR)
    If (bRet = True) Then
        LEADVector1.UnlockSupport L_SUPPORT_VECTOR, "yourstringhere"
    End If


UseLights example for C++ 4.0 and later

//toggle lighting
   m_LEADVector1.SetPolygonMode(VECTOR_POLYGON_FILL);
   m_LEADVector1.SetUseLights(TRUE);
   AfxMessageBox("wait");
   m_LEADVector1.SetUseLights(FALSE);
   AfxMessageBox("wait");

   //change the color
   m_LEADVector1.SetUseLights(TRUE);
   m_LEADVector1.SetAmbientColor(RGB(255, 0, 0));


VectorContainer example for C++ 4.0 and later

void CVec12mfcDlg::OnVectorContainerLeadvectorctrl1(short nEventType, short nObjectType, short nState, short nStatus)
{
   long x;
   CString csOut;
   switch(nEventType)
   {
   case VECTOR_CONTAINER_EVENT_DRAW:
      if(nState == VECTOR_CONTAINER_STATE_END)
      {
         switch(nObjectType)
         {
         case VECTOR_CONTAINER_OBJECT_TYPE_POINT:
            OutputDebugString("***************\n");
            OutputDebugString("Point was drawn\n");
            csOut.Format("X= %f\n", m_LEADVector1.GetAutoPointX(0));
            OutputDebugString(csOut);
            csOut.Format("Y= %f\n", m_LEADVector1.GetAutoPointY(0));
            OutputDebugString(csOut);
            csOut.Format("Z= %f\n", m_LEADVector1.GetAutoPointZ(0));
            OutputDebugString(csOut);
            OutputDebugString("***************\n");
            break;
         case VECTOR_CONTAINER_OBJECT_TYPE_LINE:
         case VECTOR_CONTAINER_OBJECT_TYPE_SQUARE:
         case VECTOR_CONTAINER_OBJECT_TYPE_RECT:
         case VECTOR_CONTAINER_OBJECT_TYPE_CIRCLE:
         case VECTOR_CONTAINER_OBJECT_TYPE_ELLIPSE:
            OutputDebugString("***************\n");
            csOut.Format("Object Type: %d\n", nObjectType);
            OutputDebugString(csOut);
            csOut.Format("StartX= %f EndX= %f\n", m_LEADVector1.GetAutoPointX(0), m_LEADVector1.GetAutoPointX(1));
            OutputDebugString(csOut);
            csOut.Format("StartY= %f EndY= %f\n", m_LEADVector1.GetAutoPointY(0), m_LEADVector1.GetAutoPointY(1));
            OutputDebugString(csOut);
            csOut.Format("StartZ= %f EndZ= %f\n", m_LEADVector1.GetAutoPointZ(0), m_LEADVector1.GetAutoPointZ(1));
            OutputDebugString(csOut);
            OutputDebugString("***************\n");
            break;
         case VECTOR_CONTAINER_OBJECT_TYPE_POLYLINE:
            OutputDebugString("***************\n");
            OutputDebugString("PolyLine was drawn\n");
            csOut.Format("PointCount = %d\n", m_LEADVector1.GetAutoPointCount());
            OutputDebugString(csOut);
            OutputDebugString("Points:\n");
            for(x=0; x<m_LEADVector1.GetAutoPointCount(); x++)
            {
               csOut.Format("X= %f\nY= %f\nZ= %f\n",
                            m_LEADVector1.GetAutoPointX(x),
                            m_LEADVector1.GetAutoPointY(x),
                            m_LEADVector1.GetAutoPointZ(x));
               OutputDebugString(csOut);
            }
            OutputDebugString("***************\n");
            break;
         case VECTOR_CONTAINER_OBJECT_TYPE_BEZIER:
            OutputDebugString("***************\n");
            OutputDebugString("Bezier was drawn\n");
            OutputDebugString("Points:\n");
            for(x=0; x<m_LEADVector1.GetAutoPointCount(); x++)
            {
               csOut.Format("X= %f\nY= %f\nZ= %f\n",
                            m_LEADVector1.GetAutoPointX(x),
                            m_LEADVector1.GetAutoPointY(x),
                            m_LEADVector1.GetAutoPointZ(x));
               OutputDebugString(csOut);
            }
            OutputDebugString("***************\n");
            break;
         case VECTOR_CONTAINER_OBJECT_TYPE_ARC:
            OutputDebugString("***************\n");
            OutputDebugString("Arc was drawn\n");
            csOut.Format("X= %f\n", m_LEADVector1.GetAutoPointX(0));
            OutputDebugString(csOut);
            csOut.Format("Y= %f\n", m_LEADVector1.GetAutoPointY(0));
            OutputDebugString(csOut);
            csOut.Format("Z= %f\n", m_LEADVector1.GetAutoPointZ(0));
            OutputDebugString(csOut);
            csOut.Format("Radius     = %f\n", m_LEADVector1.GetAutoRadius());
            OutputDebugString(csOut);
            csOut.Format("StartAngle = %f\n", m_LEADVector1.GetAutoStartAngle());
            OutputDebugString(csOut);
            csOut.Format("SweepAngle = %f\n", m_LEADVector1.GetAutoSweepAngle());
            OutputDebugString(csOut);
            OutputDebugString("***************\n");
            break;
         case VECTOR_CONTAINER_OBJECT_TYPE_TEXT:
            OutputDebugString("***************\n");
            OutputDebugString("Text was drawn\n");
            csOut.Format("String = %s", m_LEADVector1.GetAutoString());
            OutputDebugString(csOut);
            csOut.Format("Left   = %d", m_LEADVector1.GetAutoStringLeft());
            OutputDebugString(csOut);
            csOut.Format("Top    = %d", m_LEADVector1.GetAutoStringTop());
            OutputDebugString(csOut);
            csOut.Format("Width  = %d", m_LEADVector1.GetAutoStringWidth());
            OutputDebugString(csOut);
            csOut.Format("Height = %d", m_LEADVector1.GetAutoStringHeight());
            OutputDebugString(csOut);
            OutputDebugString("***************\n");
            break;
         }
      }
   }
}


VectorEngine example for C++ 4.0 and later

//use OpenGL engine and double buffering
   m_LEADVector1.SetUseDoubleBuffer(TRUE);
   m_LEADVector1.SetVectorEngine(VECTOR_ENGINE_OPENGL);
   m_LEADVector1.Load("s:\\temp\\images\\dxf\\test.dxf");


VectorUserMode example for C++ 4.0 and later

   //Turn on Vector Automation

   m_LEADVector1.SetVectorUserMode(VECTOR_USERMODE_AUTO);
   m_LEADToolBar1.CreateToolbar ((long)m_LEADVector1.m_hWnd, "Vector Tools", TOOLBAR_VECTOR);

   //Turn off Vector Automation
   m_LEADVector1.SetVectorUserMode(VECTOR_USERMODE_MANUAL);


VertexBindMode example for C++ 4.0 and later

//set bind mode
   m_LEADVector1.SetVertexBindMode(VECTOR_UNBIND_VERTICES);
   //now scale the current object
   m_LEADVector1.SetScaling(3.0f, 3.0f, 3.0f,
                            0.0f, 0.0f, 0.0f,
                            FALSE, VECTOR_CURRENT_OBJECT);


ViewContext example for C++ 4.0 and later

void CVectorView::OnClick()
{
   m_LastSelectedObject.SetDescription ( "titanium camshaft for high performance" );
   m_LastSelectedObject.SetViewContextMinX ( 0.0 );
   m_LastSelectedObject.SetViewContextMinY ( 0.0 );
   m_LastSelectedObject.SetViewContextMinZ ( 0.0 );
   m_LastSelectedObject.SetViewContextMaxX ( 100.0 );
   m_LastSelectedObject.SetViewContextMaxY ( 100.0 );
   m_LastSelectedObject.SetViewContextMaxZ ( 0.0 );

   m_LastSelectedObject.SetViewContext ( TRUE );
}


ViewMode example for C++ 4.0 and later

//toggle the ViewMode
   m_LEADVector1.SetAutoRepaint(TRUE);
   if(m_LEADVector1.GetViewMode() == VECTOR_VIEWMODE_FIT)
      m_LEADVector1.SetViewMode(VECTOR_VIEWMODE_SNAP);
   else
      m_LEADVector1.SetViewMode(VECTOR_VIEWMODE_FIT);


ViewModeDlgViewMode example for C++ 4.0 and later

m_LEADVector1.SetViewModeDlgViewMode(m_LEADVector1.GetViewMode());
   m_LEADVector1.ShowViewModeDlg(VECTOR_DLG_AUTOPROCESS | VECTOR_DLG_SHOWPREVIEW);


ViewportLeft example for C++ 4.0 and later

//cut viewport in half
   m_LEADVector1.SetViewportLeft(0.0f);
   m_LEADVector1.SetViewportTop(0.0f);
   m_LEADVector1.SetViewportWidth(m_LEADVector1.GetViewportWidth() / 2);
   m_LEADVector1.SetViewportHeight(m_LEADVector1.GetViewportHeight() / 2);


VectorEvent event example for C++ 4.0 and later

void CAutTutDlg::OnVectorEvent Leadvector1(short nEvent, short nStatus, long nLevel, short nErrorCode, LPDISPATCH pObject, LPDISPATCH pLayer, double x1, double y1, double z1, double x2, double y2, double z2, long dwFlags)
{
   //this sample will select each object as it is added
   //this sample will also print information about each layer that is added
   //NOTE: this could be very slow with a vector that has a lot of objects!!
   CString szOut;

   if(nEvent == VECTOREVENT_ADDOBJECT &&
      nStatus == VECTOREVENT_STATUS_AFTER &&
      nErrorCode == 0)
   {
      CLEADVectorObject Object(pObject);
      Object.SetSelected(TRUE);
      Object.DetachDispatch();
   }
   if(nEvent == VECTOREVENT_ADDLAYER &&
      nStatus == VECTOREVENT_STATUS_AFTER &&
      nErrorCode == 0)
   {
      CLEADVectorLayer Layer(pLayer);
      szOut.Format("Added Layer: %s ID= %d\n", Layer.GetName(), Layer.GetId());
      OutputDebugString(szOut);
      Layer.DetachDispatch();
   }
}


VectorEvent method example for C++ 4.0 and later

   m_LEADVector1.VectorEvent(101, VECTOREVENT_STATUS_BEFORE);
   m_LEADVector1.SetRotation(10.0f, 10.0f, -10.0f, 0.0f, 0.0f, 0.0f, FALSE, VECTOR_ALL_OBJECTS);
   m_LEADVector1.SetScaling(2.0f, 2.0f, 2.0f, 0.0f, 0.0f, 0.0f, FALSE, VECTOR_ALL_OBJECTS);
   m_LEADVector1.VectorEvent(101, VECTOREVENT_STATUS_AFTER);


ILTVectorAutomation::CurrentTool example for C++ 4.0 and later

   CString csOut;
   m_LEADVector1.GetAutomationProps().SetCurrentTool(BUTTON_ID_TOOL_VECTOR_LINE);
   csOut.Format("%d", m_LEADVector1.GetAutomationProps().GetCurrentTool());
   AfxMessageBox(csOut);


VectorDataPath Example for Visual C++ 4.0 and later
VectorDataPath Example for C++ 4.0 and later

//start the load

m_LEADVector1.SetVectorDataPath("http://10.1.1.105\\booster.dxf");
void CMfcvecdlDlg::OnReadyStateChangeLeadvectorctrl1(long nReadyState)
{
static int nCount=0;
CString cs;
nCount++;
cs.Format("ReadyState = %d count=%d", nReadyState, nCount);
SetWindowText(cs);
}


PreferredLoadFormat Example for Visual C++ 4.0
PreferredLoadFormat Example for C++ 4.0 and later

m_LEADVector1.SetPreferredLoadFormat(FILE_DXF);


ZoomRect example for C++ 4.0 and later

m_LEADVector1.ZoomRect ( 0, 0, 100, 100 );


Error Codes

For a list of all possible error codes for LEADTOOLS Vector OCX functionailty, refer to LEADTOOLS OCX Error Codes in the Main OCX help file (Ltocxn.hlp).


Introduction

All LEADTOOLS Vector features are included in the LEADTOOLS Vector Imaging Pro toolkits.  The Vector features provide the ability to load, modify and save vector images.

Please note that functions available only in the LEADTOOLS Vector Imaging Pro toolkits are designated "This function is available in the LEADTOOLS Vector Imaging Pro Toolkit." in the documentation.

Executable demos are included in all LEADTOOLS products. The executable demos provide a quick and easy way to evaluate the Vector features and performance.

The Vector features are shipped with the LEADTOOLS products listed above, however they are locked.  For information on unlocking support for the Vector features, refer to Unlocking Support for the Vector Features.

You can use the LEADTOOLS Vector features in any programming environment that supports OLE custom controls, including the following:

Visual C++ 4.0 and later (32-bit)
Visual Basic 4.0 and later (32-bit)
Delphi 2.0 and later (32-bit)

Summary of All Supported Image File Formats

Summary of All Supported Vector File Formats

Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.


AddGroup method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AddGroup (BSTR pszName, long nUserTag, long nFlags);

Overview	Refer to Working with Vector Groups

Remarks

(Vector Imaging Pro Only) To change group settings, retrieve a handle to the vector group using the GetGroupByIndex or GetGroupByName methods and change the desired properties.

See Also

Functions:	GetGroupByIndex method, GetGroupByName method, CopyGroup method, ILEADVectorGroup::Delete method, ILEADVectorGroup::Empty method, ILEADVectorObject::InsertInGroup method

Topics:	Vector Images: Grouping Vector Objects


pszName Parameter For AddGroup
pszName

String that contains the name of the group.


nUserTag Parameter For AddGroup
nUserTag

User-defined tag.


nFlags Parameter For AddGroup
nFlags

Flag that indicates whether to rename duplicate group names. Possible values are:

Value	Meaning

0	Don't rename duplicate group names, if found.

VECTOR_FLAGS_RENAME_DUPLICATES	Renames duplicate group names if found. The toolkit will add a suffix (0, 1, 2, etc) to the group name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.


Return for AddGroup
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


AddLayer method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AddLayer (BSTR pszName, VARIANT_BOOL bVisible, VARIANT_BOOL bLocked, long nUserTag, long nFlags);

Overview	Refer to Working with Vector Layers

Remarks

(Vector Imaging Pro Only) To change layer settings, retrieve a handle to the vector layer using the GetActiveLayer, GetLayerByIndex or GetLayerByName methods and change the desired proprties.

See Also

Elements	GetActiveLayer method, GetLayerByIndex method, GetLayerByName method, LayerCount property

Topics	Getting/Setting Vector Layer Information


pszName Parameter For AddLayer
pszName

String that contains the name of the layer.


bVisible Parameter For AddLayer
bVisible

Flag that indicates whether or not the layer is visible. Possible values are:

Value	Meaning

TRUE	The layer is visible.

FALSE	The layer is not visible.


bLocked Parameter For AddLayer
blocked

Flag that indicates whether or not the layer is locked. A layer cannot be edited if it is locked. Possible values are:

Value	Meaning

TRUE	The layer is locked.

FALSE	The layer is not locked.


nUserTag Parameter For AddLayer
nUserTag

User-defined tag.


nFlags Parameter For AddLayer
nFlags

Flag that indicates whether or not to rename duplicate layer names. Possible values are:

Value	Meaning

0	Don't rename duplicate layer names, if found.

VECTOR_FLAGS_RENAME_DUPLICATES	Renames duplicate layer names if found. The toolkit will add a suffix (0, 1, 2, etc) to the layer name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.


Return for AddLayer
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


AddNewObject method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	ILEADVectorObject AddNewObject (VectorObjectType ObjectType);

Overview	Refer to Working with Vector Objects

Remarks

(Vector Imaging Pro Only) Once the properties of the object are set, the object can then be inserted into the Vector image using the ILEADVectorObject::Insert method.

To insert the new object into the active layer, pass -1 as the parameter to the ILEADVectorObject::Insert method.

This method will generate a runtime exception, if the EnableMethodErrors property has been set to TRUE. To properly trap runtime exceptions, you can do the following:

On Error Goto MYERRORHANDLER 'start exception handling
LEADVector1.EnableMethodErrors = True ' turn on LEAD exceptions
LEADVector1.AddNewObject(…) ' call a method
LEADVector1.XXXXX(…) ' call another method
On Error Goto 0 ' stop exception handling

Exit Sub

MYERRORHANDLER:
   MsgBox "Error: " & CStr(Err.Number)
'……..

See Also

Topics	Modifying Object Characteristics


ObjectType Parameter For AddNewObject
ObjectType

Type of object to add. Possible values are:

Value	Meaning

VECTOR_OBJECT	[0]

VECTOR_VERTEX	[1] 3D vertex in space.

VECTOR_LINE	[2] Line.

VECTOR_RECTANGLE	[3] Rectangle.

VECTOR_POLYLINE	[4] Polyline.

VECTOR_POLYBEZIER	[5] Poly Bezier curve

VECTOR_POLYGON	[6] Multi-sided polygon.

VECTOR_ELLIPSE	[7] Ellipse.

VECTOR_CIRCLE	[8] Circle.

VECTOR_ARC	[9] Arc.

VECTOR_ELLIPTICALARC	[10] Elliptical arc

VECTOR_TEXT	[11] Text.

VECTOR_PIE	[12] Pie.

VECTOR_CHORD	[13] Chord.

VECTOR_POLYDRAW	[14] Polydraw.

VECTOR_RASTER	[15] Raster.

VECTOR_STOCK	[16] Stock object from a library.

VECTOR_HPOLYBEZIER	[18] HPoly Bezier

VECTOR_SPLINE	[19] Spline


Return for AddNewObject
Return Value

Returns a newly created VectorObject of the specified type.


AddUndoNode method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AddUndoNode (long nFlags);

Overview	Refer to Undoing and Redoing Automation Operations

Remarks

Manually adds an undo node to the automation container.

This method adds an undo node to the automation container. When used with the EnableUndo method, a lengthy operation, consisting of multiple steps, can be combined into one undo call to the Undo method. To accomplish this, use the following steps:

1.	Call the AddUndoNode method to add an undo node to the automation container.

2.	Disable the undo feature by calling the EnableUndo method (FALSE).

3.	Perform the operations to be combined into one undo. For example:

Vector Rotate

Vector Scale

Vector Translate

4.	Re-enable the undo feature by calling the EnableUndo method (TRUE).

Now, all three operations can be undone with one call to the Undo method instead of three calls to the Undo method.

See Also

Elements	EnableUndo method, CanUndo method, UndoLevel property, Undo method

Topics:	Vector Automation: Undoing/Redoing Operations


nFlags Parameter For AddUndoNode
nFlags

Reserved for future use. Use 0.


Return for AddUndoNode
Return Value

Return	Meaning

0	The method was successful.

<> 0 	An error occurred. Refer to Error Codes.


AmbientColor property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	OLE_COLOR AmbientColor

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the ambient (room) light used when drawing a vector image.

This property will only be effective if the UseLights property has been enabled.

The default ambient light is white (RGB(255, 255, 255)).

This property has no effect in the GDI engine.

See Also

Elements	Dlg3DoptionsAmbientColor property, UseLights property, Dlg3DoptionsUseLights property


AntiAliasingDim property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AntiAliasingDim

Overview	Refer to Overview

Remarks

Gets or sets the size of the anti-aliasing mask. For example, a value of three indicates an anti-aliasing mask of 3 X 3

See Also

Elements	ClipMode property, RenderTextAsCurves property, AntiAliasingThreshold property, AntiAliasingFilter property

Topics	Vector Images: Display Settings


AntiAliasingFilter property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AntiAliasingFilter

Overview	Refer to Overview

Remarks

Gets or sets the type of anti-aliasing filter to use. Possible values are:

Value	Meaning

ANTIALIAS_1	[0x0000] Anti-alias the bitmap vertically and horizontally.

ANTIALIAS_2	[0x0001] Anti-alias the bitmap in all directions.

ANTIALIAS_3	[0x0002] Anti-alias the bitmap in all directions. The filter used for this option is different from the filter used for the ANTIALIAS_2 option.

ANTIALIAS_DIAG	[0x0003] Anti-alias the bitmap diagonally.

ANTIALIAS_HORZ	[0x0004] Anti-alias the bitmap horizontally.

ANTIALIAS_VERT	[0x0005] Anti-alias the bitmap vertically.

See Also

Elements	ClipMode property, RenderTextAsCurves property, AntiAliasingThreshold property, AntiAliasingDim property

Topics	Vector Images: Display Settings


AntiAliasingThreshold property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AntiAliasingThreshold

Overview	Refer to Overview

Remarks

Gets or sets the threshold value to indicate which pixels to smooth. The application of the anti-aliasing filter on the image associates a value with each pixel. Only pixels with values above this threshold are smoothed.

See Also

Elements	ClipMode property, RenderTextAsCurves property, AntiAliasingDim property, AntiAliasingFilter property

Topics	Vector Images: Display Settings


Appearance property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short Appearance

Overview	Refer to Viewing a Vector Image

Remarks

(persistent property, available at design time) Determines whether the Vector Control has a flat or three-dimensional appearance.

Setting	Description

APPEARANCE_FLAT	Flat appearance

APPEARANCE_THREED	Three-dimensional appearance

See Also

Elements	AutoRepaint property, AutoScroll property, BorderStyle property


ApplyTransformation method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ApplyTransformation (void);

Overview	Refer to Working with Vector Objects

Remarks

(Vector Imaging Pro Only) This method will apply current transformation (Rotation, scaling and translation) to the vector image. The vector image objects will be changed.

After a call to this method, rotation, scaling and translation values will be reset.

Not supported in DirectX engine.

See Also

Elements	SetRotation method,  SetScaling method, SetTranslation method, Save method


pvMem Parameter For ApplyTransformation
pvMem

A VARIANT byte array that contains a vector file in memory.


Return for ApplyTransformation
Return Value

The size of the specified byte array.


ArraySize method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long ArraySize (VARIANT *pvMem);

Overview	Refer to Loading and Saving Vectors

Remarks

Returns the size of the specified byte array.

To save a vector to a byte array in memory, refer to the SaveArray method.

See Also

Elements	LoadMemory method, SaveArray method, SaveMemory method, LoadArray method


pvMem Parameter For ArraySize
pvMem

A VARIANT byte array that contains a vector file in memory.


Return for ArraySize
Return Value

The size of the specified byte array.


AutoContainer property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	ILTVectorContainer AutoContainer

Overview	Refer to Automation Container

Remarks

Gets or sets the vector automation container.

This property provides access to the Vector container interface. For more information about the interface, refer to ILTVectorContainer.

See Also

Elements	AutomationProps property

Topics:	Vector Automation: Interfaces


AutoCopy method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AutoCopy (long nFlagsAutoCopynFlags);

Overview	Refer to Editing Automation Containers

Remarks

Copies the selected objects in the active automation container to the Windows clipboard.

To paste automation data on the clipboard to the active automation container, call the AutoPaste method.

Automation data can be cut from the active automation container and placed on the clipboard using the AutoCut method.

See Also

Elements	AutoCut method, AutoPaste method, AutoDelete method, AutoSelect method

Topics:	Vector Automation: Editing Containers


nFlags Parameter For AutoCopy
nFlags

Reserved for future use. Use 0.


Returns For AutoCopy
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


AutoCut method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AutoCut (long nFlags);

Overview	Refer to Editing Automation Containers

Remarks

(Vector Imaging Pro Only) Cuts the selected objects in the active automation container to the Windows clipboard.

To paste automation data on the clipboard to the active automation container, call the AutoPaste method.

To copy automation data from the active automation container, to the Windows clipboard, use the AutoCopy method.

Call the ClipboardReady method to determine whether valid data exists on the clipboard.

See Also

Elements	AutoCopy method, AutoPaste method, AutoDelete method, AutoSelect method

Topics:	Vector Automation: Editing Containers


nFlags Parameter For AutoCut
nFlags

Reserved for future use. Use 0.


Returns For AutoCut
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


AutoDelete method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AutoDelete (long nFlags);

Overview	Refer to Editing Automation Containers

Remarks

Deletes the selected objects from the active automation container.

See Also

Elements	AutoCopy method, AutoPaste method, AutoCut method, AutoSelect method

Topics:	Vector Automation: Editing Containers


nFlags Parameter For AutoDelete
nFlags

Reserved for future use. Use 0.


Returns For AutoDelete
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


AutoEditObject method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AutoEditObject (long hObject);

Overview	Refer to Working with Objects Within an Automation Container

Remarks

(Vector Imaging Pro Only) Edits the specified vector object.

See Also

Elements	AutoSelect method, AutomationProps property, AutoContainer property

Topics:	Vector Automation: Working with Objects


hObject Parameter For AutoEditObject
hObject

Handle to the vector object to edit.


Returns For AutoEditObject
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


AutomationProps property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	ILTVectorAutomation AutomationProps

Overview	Refer to Automation Container

Remarks

Gets or sets the current automation properties.

The ILTVectorAutomation interface holds information about the Pen, Brush and Font to be used when a new vector object is created in vector automation mode.

For more information about the interface, refer to ILTVectorAutomation.

See Also

Elements	AutoContainer property

Topics:	Vector Automation: Interfaces


AutoPaste method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short AutoPaste (long nFlags);

Overview	Refer to Editing Automation Containers

Remarks

Copies the valid automation data on the clipboard to the active automation container.

Call the ClipboardReady method to determine whether valid data exists on the clipboard.

To copy automation data from the active automation container to the clipboard use the AutoCopy method. Automation data can be cut from the active automation container and placed on the clipboard using the AutoCut method.

See Also

Elements	AutoCopy method, AutoCut method, AutoDelete method, AutoSelect method

Topics:	Vector Automation: Editing Containers


nFlags Parameter For AutoPaste
nFlags

Reserved for future use. Use 0.


Returns For AutoPaste
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


AutoPointCount property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AutoPointCount

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the number of points filled by the VectorContainer event.

See Also

Elements	AutoPointY property, AutoPointY property, AutoPointZ property, VectorContainer event

Topics:	Vector Automation: Container Events


AutoPointX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double AutoPointX (long nIndex)

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the x coordinate(s) of the point(s) filled by the VectorContainer event.

AutoPointX may be updated with the x coordinates of one or more points, depending on the object drawn in automation mode. If a vector arc object is drawn, AutoPointX is updated with the x coordinate of the vertex of the arc. (The point about which the arc sweeps.) If a vector Polyline object is drawn, AutoPointX is updated with the x coordinate of all points within the Polyline object.

See Also

Elements	AutoPointY property, AutoPointZ property, VectorContainer event, AutoPointCount property

Topics:	Vector Automation: Container Events


nIndex Parameter For AutoPointX
nIndex

Index into an array of x coordinates filled by the VectorContainer event.


AutoPointY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double AutoPointY (long nIndex)

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the y coordinate(s) of the point(s) filled by the VectorContainer event.

AutoPointY may be updated with the y coordinates of one or more points, depending on the object drawn in automation mode. If a vector arc object is drawn, AutoPointY is updated with the y coordinate of the vertex of the arc. (The point about which the arc sweeps.) If a vector Polyline object is drawn, AutoPointY is updated with the y coordinate of all points within the Polyline object.

See Also

Elements	AutoPointX property, AutoPointZ property, VectorContainer event, AutoPointCount property

Topics:	Vector Automation: Container Events


nIndex Parameter For AutoPointY
nIndex

Index into an array of y coordinates filled by the VectorContainer event.


AutoPointZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double AutoPointZ (long nIndex)

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the z coordinate(s) of the point(s) filled by the VectorContainer event.

AutoPointZ may be updated with the z coordinates of one or more points, depending on the object drawn in automation mode. If a vector arc object is drawn, AutoPointZ is updated with the z coordinate of the vertex of the arc. (The point about which the arc sweeps.) If a vector Polyline object is drawn, AutoPointZ is updated with the z coordinate of all points within the Polyline object.

See Also

Elements	AutoPointX property, AutoPointY property, VectorContainer event, AutoPointCount property

Topics:	Vector Automation: Container Events


nIndex Parameter For AutoPointZ
nIndex

Index into an array of z coordinates filled by the VectorContainer event.


AutoRadius property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double AutoRadius

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the radius value filled by the VectorContainer event.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_ARC. This value is the radius of the arc drawn in Vector Automation mode.

When an arc vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_ARC. The VectorContainer event updates the AutoPointX, AutoPointY and AutoPointZ properties with the x, y and z coordinates of the vertex of the arc. (The point about which the arc sweeps.) The AutoRadius property is updated with the radius of the arc. The AutoStartAngle and AutoSweepAngle properties are updated with the starting angle of the arc and the sweep angle of the arc, respectively.

See Also

Elements	AutoStartAngle property, AutoSweepAngle property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


AutoRender method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short AutoRender (long nFlags);

Overview	Refer to Automation Printing

Remarks

Prints the objects in the active automation container that are currently displayed on the screen.

See Also

Elements	AutoCopy method, AutoPaste method, AutoDelete method, AutoSelect method

Topics:	Vector Automation: Printing


nFlags Parameter For AutoRender
nFlags

Reserved for future use. Use 0.


Returns For AutoRender
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


AutoRepaint property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL AutoRepaint

Overview	Refer to Viewing a Vector Image

Remarks

(Persistent property, available at design time) Enables automatic repainting of the vector.

When this property is TRUE, any change in the vector causes the vector to repaint. At run time, you can set the property to FALSE temporarily to change more than one property before repainting. Alternatively, you can use the ForceRepaint method to control repainting.

Setting	Description

TRUE	Enables automatic repainting of the vector.

FALSE	Disables automatic repainting of the vector.

See Also

Elements	ForceRepaint method, Appearance property, BorderStyle property


AutoScroll property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL AutoScroll

Overview	Refer to Viewing a Vector Image

Remarks

(Persistent property, available at design time) Enables automatic implementation of scroll bars.

Setting	Description

TRUE	Enables automatic implementation of scroll bars if the image display is bigger than the control.

FALSE	Disables automatic implementation of scroll bars.

See Also

Elements	AutoRepaint property, Appearance property


AutoSelect method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short AutoSelect (VectorAutomationSelType Selection, long nFlags);

Overview	Refer to Working with Objects Within an Automation Container

Remarks

(Vector Imaging Pro Only) Selects or unselects all objects within the active automation container.

See Also

Elements	AutoCopy method, AutoPaste method, AutoDelete method, AutoCut method

Topics	Vector Automation: Working with Objects


Selection Parameter For AutoSelect
Selection

An integer value that indicates whether to select or unselect the items in the active automation container. Possible values are:

Value	Meaning

VECTOR_AUTOMATION_SELTYPE_NONE	Unselect the entire container.

VECTOR_AUTOMATION_SELTYPE_ALL	Select the entire container.


nFlag Parameter For AutoSelect
nFlags

Reserved for future use. Use 0.


Returns For AutoSelect
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


AutoStartAngle property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double AutoStartAngle

Overview	Refer to Handling Container Events.

Remarks

(Read only) Gets the start angle value filled by the VectorContainer event. This value is measured in degrees.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_ARC. This value is the start angle of the arc drawn in Vector Automation mode.

When an arc vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_ARC. The VectorContainer event updates the AutoPointX, AutoPointY and AutoPointZ properties with the x, y and z coordinates of the vertex of the arc. (The point about which the arc sweeps.) The AutoRadius property is updated with the radius of the arc. The AutoStartAngle and AutoSweepAngle properties are updated with the starting angle of the arc and the sweep angle of the arc, respectively.

Constructing an imaginary circle around the center point (AutoPointX property, AutoPointY property, AutoPointZ property), with the specified radius (AutoRadius property) draws the arc. The starting point of the arc is determined by measuring counterclockwise from the x-axis of the circle by the number of degrees in the start angle (AutoStartAngle property). The ending point is similarly located by measuring counterclockwise from the starting point by the number of degrees in the sweep angle (AutoSweepAngle property). Below is a graphical representation.

See Also

Elements	AutoStartAngle property, AutoSweepAngle property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


AutoString property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BSTR AutoString

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the string filled by the VectorContainer event.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_TEXT. This value is the actual text displayed in the vector text object drawn in Vector Automation mode.

When a text vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_TEXT. The VectorContainer event updates the AutoStringLeft, AutoStringTop, AutoStringWidth and AutoStringHeight properties with the boundaries of the rectangle that contains the text. The AutoString property is updated with the actual text displayed in the vector text object.

See Also

Elements	AutoStringLeft property, AutoStringTop property, AutoStringWidth property, AutoStringHeight property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


AutoStringHeight property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AutoStringHeight

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the auto string height value filled by the VectorContainer event.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_TEXT. This value is the height of the rectangle that contains the text of the vector text object drawn in Vector Automation mode.

When a text vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_TEXT. The VectorContainer event updates the AutoStringLeft, AutoStringTop, AutoStringWidth and AutoStringHeight properties with the boundaries of the rectangle that contains the text. The AutoString property is updated with the actual text displayed in the vector text object.

See Also

Elements	AutoString property, AutoStringTop property, AutoStringWidth property, AutoStringLeft property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


AutoStringLeft property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AutoStringLeft

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the auto string left value filled by the VectorContainer event.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_TEXT. This value is the left boundary of the rectangle that contains the text of the vector text object drawn in Vector Automation mode.

When a text vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_TEXT. The VectorContainer event updates the AutoStringLeft, AutoStringTop, AutoStringWidth and AutoStringHeight properties with the boundaries of the rectangle that contains the text. The AutoString property is updated with the actual text displayed in the vector text object.

See Also

Elements	AutoString property, AutoStringTop property, AutoStringWidth property, AutoStringHeight property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


AutoStringTop property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AutoStringTop

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the auto string top value filled by the VectorContainer event.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_TEXT. This value is the top boundary of the rectangle that contains the text of the vector text object drawn in Vector Automation mode.

When a text vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_TEXT. The VectorContainer event updates the AutoStringLeft, AutoStringTop, AutoStringWidth and AutoStringHeight properties with the boundaries of the rectangle that contains the text. The AutoString property is updated with the actual text displayed in the vector text object.

See Also

Elements	AutoString property, AutoStringHeight property, AutoStringWidth property, AutoStringLeft property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


AutoStringWidth property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long AutoStringWidth

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the auto string width value filled by the VectorContainer event.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_TEXT. This value is the width of the rectangle that contains the text of the vector text object drawn in Vector Automation mode.

When a text vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_TEXT. The VectorContainer event updates the AutoStringLeft, AutoStringTop, AutoStringWidth and AutoStringHeight properties with the boundaries of the rectangle that contains the text. The AutoString property is updated with the actual text displayed in the vector text object.

See Also

Elements	AutoString property, AutoStringTop property, AutoStringHeight property, AutoStringLeft property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


AutoSweepAngle property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double AutoSweepAngle

Overview	Refer to Handling Container Events

Remarks

(Read only) Gets the sweep angle value filled by the VectorContainer event. This value is measured in degrees.

This property is valid only if the nObjectType parameter of the VectorContainer event is VECTOR_CONTAINER_OBJECT_TYPE_ARC. This value is the sweep angle of the arc drawn in Vector Automation mode.

When an arc vector object is drawn in vector automation mode, the VectorContainer event is fired with the nObjectType parameter equal to VECTOR_CONTAINER_OBJECT_TYPE_ARC. The VectorContainer event updates the AutoPointX, AutoPointY and AutoPointZ properties with the x, y and z coordinates of the vertex of the arc. (The point about which the arc sweeps.) The AutoRadius property is updated with the radius of the arc. The AutoStartAngle and AutoSweepAngle properties are updated with the starting angle of the arc and the sweep angle of the arc, respectively.

Constructing an imaginary circle around the center point (AutoPointX property, AutoPointY property, AutoPointZ property), with the specified radius (AutoRadius property) draws the arc. The starting point of the arc is determined by measuring counterclockwise from the x-axis of the circle by the number of degrees in the start angle (AutoStartAngle property). The ending point is similarly located by measuring counterclockwise from the starting point by the number of degrees in the sweep angle (AutoSweepAngle property). Below is a graphical representation.

See Also

Elements	AutoStartAngle property, AutoSweepAngle property, VectorContainer event, VectorUserMode property

Topics:	Vector Automation: Container Events


BackColor property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	OLE_COLOR BackColor

Overview	Refer to Viewing a Vector Image

Remarks

Sets the color used to erase the background of the vector when painting. This is also the background color for the control. This is set when you load a vector image, and may be changed after loading.

See Also

Elements	Appearance property, BorderStyle property, BackErase property


BackErase property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL BackErase

Overview	Refer to Viewing a Vector Image

Remarks

Flag that indicates whether or not to erase the background rectangle when rendering the vector. Possible values are:

Value	Meaning

TRUE	The background rectangle will be erased, using the current BackColor when the vector image is rendered to the device context.

FALSE	The background rectangle will not be erased.

See Also

Elements	BackColor property, Appearance property, BorderStyle property


BorderStyle property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short BorderStyle

Overview	Refer to Viewing a Vector Image

Remarks

Sets the border style of the Vector Control.

Setting	Description

0	No border.

1	Place a single line border around the control.

See Also

Elements	Appearance property, BackColor property


CameraDistance property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	double CameraDistance

Overview	Refer to Viewing a Vector Image

Remarks

Distance between the camera and the object.

See Also

Elements	CameraLookAtX property, CameraLookAtY property, CameraLookAtZ property, CameraDlgDistance property, Reset method

Topics	Modifying Viewing Characteristics


CameraDlgDistance property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraDlgDistance

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Camera dialog that represents the distance between the camera and the object.

The value present in this property when the ShowCameraDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowCameraDlg method, the dialog will be initialized with the default value 1.0. When the ShowCameraDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	CameraDlgLookAtX property, CameraDlgLookAtY property, CameraDlgLookAtZ property, ShowCameraDlg method, CameraDlgUsePerspective property, CameraDistance property

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


CameraDlgLookAtX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraDlgLookAtX

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Camera dialog that represents the X coordinate of the point on which the camera is focused.

The value present in this property when the ShowCameraDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowCameraDlg method, the dialog will be initialized with the default value 0.0. When the ShowCameraDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	CameraLookAtX property, CameraDlgLookAtY property, CameraDlgLookAtZ property, ShowCameraDlg method

Topics	Modifying Viewing Characteristics

Using Vector Dialogs


CameraDlgLookAtY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraDlgLookAtY

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Camera dialog that represents the Y coordinate of the point on which the camera is focused.

The value present in this property when the ShowCameraDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowCameraDlg method, the dialog will be initialized with the default value 0.0. When the ShowCameraDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	CameraLookAtY property, CameraDlgLookAtX property, CameraDlgLookAtZ property, ShowCameraDlg method

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


CameraDlgLookAtZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraDlgLookAtZ

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Camera dialog that represents the Z coordinate of the point on which the camera is focused.

The value present in this property when the ShowCameraDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowCameraDlg method, the dialog will be initialized with the default value 0.0. When the ShowCameraDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	CameraLookAtZ property, CameraDlgLookAtX property, CameraDlgLookAtY property, ShowCameraDlg method

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


CameraDlgUsePerspective property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL CameraDlgUsePerspective

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Camera dialog that represents type of projection.

The value present in this property when the ShowCameraDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowCameraDlg method, the dialog will be initialized with the default value TRUE. When the ShowCameraDlg method returns, this property is updated with the value entered through the dialog.

Possible values are:

Value	Meaning

TRUE	Perspective projection is used.

FALSE	Parallel projection is used.

See Also

Elements	CameraUsePerspective property, CameraDlgLookAtX property, CameraDlgLookAtY property, CameraDlgLookAtZ property, ShowCameraDlg method, CameraDistance property

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


CameraDlgPhi property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraDlgPhi

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the rotation angle off the Z axis for the VectorCamera dialog box.

See Also

Elements	CameraDlgTheta property, CameraDlgZoom property, ShowCameraDlg method


CameraDlgTheta property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraDlgTheta

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the rotation angle around the Z axis for the VectorCamera dialog box.

See Also

Elements	CameraDlgPhi property, CameraDlgZoom property, ShowCameraDlg method


CameraDlgZoom property (Vector Control)

This property has been removed. Use the following properties instead:

CameraDlgLookAtX property

CameraDlgLookAtY property

CameraDlgLookAtZ property

CameraDlgDistance property

CameraDlgUsePerspective property


CameraLookAtX property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	double CameraLookAtX

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the X coordinate of the point on which the camera is focused.

See Also

Elements	CameraLookAtY property, CameraLookAtZ property, CameraDistance property, CameraUsePerspective property, CameraDlgLookAtX property, Reset method

Topics	Modifying Viewing Characteristics


CameraLookAtY property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	double CameraLookAtY

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the Y coordinate of the point on which the camera is focused.

See Also

Elements	CameraLookAtX property, CameraLookAtZ property, CameraDistance property, CameraUsePerspective property, CameraDlgLookAtY property, Reset method

Topics	Modifying Viewing Characteristics


CameraLookAtZ property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	double CameraLookAtZ

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the Z coordinate of the point on which the camera is focused.

See Also

Elements	CameraLookAtX property, CameraLookAtY property, CameraDistance property, CameraUsePerspective property, CameraDlgLookAtZ property, Reset method

Topics	Modifying Viewing Characteristics


CameraUsePerspective property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	VARIANT_BOOL CameraUsePerspective

Overview	Refer to Viewing a Vector Image

Remarks

Flag that indicates the type of projection. Possible values are:

Value	Meaning

TRUE	Perspective projection is used.

FALSE	Parallel projection is used.

See Also

Elements	CameraLookAtX property, CameraLookAtY property, CameraLookAtZ property, CameraDistance property, CameraDlgUsePerspective property, Reset method

Topics	Modifying Viewing Characteristics


CameraPhi property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraPhi

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the rotation angle off the Z axis.

The camera object is used along with the viewport to project the vector image into a 2D plane.

The camera can be used with either 2D or 3D vector images.

See Also

Elements	CameraTheta property, CameraZoom property, ShowCameraDlg method


CameraTheta property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double CameraTheta

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the rotation angle around the Z axis.

The camera object is used along with the viewport to project the vector image into a 2D plane.

The camera can be used with either 2D or 3D vector images.

See Also

Elements	CameraPhi property, CameraZoom property, ShowCameraDlg method


CameraZoom property (Vector Control)

This property has been removed. Use the following properties instead:

CameraLookAtX property

CameraLookAtY property

CameraLookAtZ property

CameraDistance property

CameraUsePerspective property


CanRedo method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL CanRedo (void);

Overview	Refer to Undoing and Redoing Automation Operations

Remarks

Determines whether or not the last automation operation in the active automation container can be redone.

To redo an automation operation, call the Redo method.

See Also

Elements	Redo method, CanUndo method, UndoLevel property, Undo method, AddUndoNode method, EnableUndo method

Topics:	Vector Automation: Undoing/Redoing Operations


Returns For CanRedo
Return Value

Return	Meaning

TRUE	The last automation operation can be redone.

FALSE	The last automation operation cannot be redone.


CanUndo method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL CanUndo (void);

Overview	Refer to Undoing and Redoing Automation Operations

Remarks

Determines whether or not the last automation operation in the active automation container can be undone.

The number of automation operations that can be undone is contained in the UndoLevel property.

To undo an automation operation, call the Undo method.

For information about grouping multiple operations into a single undo process, refer to the AddUndoNode method.

See Also

Elements	UndoLevel property, Undo method, AddUndoNode method, EnableUndo method, CanRedo method, Redo method

Topics:	Vector Automation: Undoing/Redoing Operations


Returns For CanUndo
Return Value

Return	Meaning

TRUE	The last automation operation can be undone.

FALSE	The last automation operation cannot be undone.


Click event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void Click ();

Overview	Refer to Working with the Mouse and the Keyboard.

Remarks

Occurs when the user presses and releases a mouse button over the Main Control.

This is one of three events that occur in the following order:

1.	MouseDown event

2.	MouseUp event

3.	Click event

The first two events let you check which mouse button is pressed.

See Also

Elements	DblClick event, MouseDown event, MouseMove event, MouseUp event


ClipboardReady method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	VARIANT_BOOL ClipboardReady ();

Overview	Refer to Using the Clipboard

Remarks

Determines whether the Windows clipboard contains vector data that can be copied using the Paste method.

To copy vector data to the clipboard, call the Copy method.

To copy vector data to a vector handle, from the clipboard, call the Paste method.

See Also

Elements	Copy method, Paste method

Topics	Using the Clipboard


Return for ClipboardReady
Return Value

Return	Meaning

TRUE	The object(s) is(are) inside the specified parallelogram.

FALSE	The object(s) is(are) not inside the specified parallelogram.


ClipMode property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long ClipMode

Overview	Refer to Overview

Remarks

Gets or sets a value that describes how the toolkit applies the clipping when two or more clipping polydraw objects exist. Possible values are:

Value	Meaning

VECTOR_CLIPMODE_COPY	Overwrites the old clipping region with this one.

VECTOR_CLIPMODE_AND	Generates a new clipping region from the intersection of the old and current regions.

VECTOR_CLIPMODE_DIFF	Generates a new clipping region in the area between the old and current regions.

VECTOR_CLIPMODE_OR	Generates a new clipping region from the area represented by both the old and current regions.

VECTOR_CLIPMODE_XOR	Generates a clipping region from XORing the two clipping regions (the old one and the current).

The "old region" refers to the region specified by a clipping polydraw that was added previously to the vector space and the "current region" is a new region that is about to be drawn.

A clipping polydraw sets a clipping region that is applied to any vector object added after the clipping polydraw is added. For example, if the user adds object #1, then adds a clipping polydraw, and then adds objects #2 and #3, the toolkit will draw object #1 without modification. It will then render the clipping polydraw, which will set a clipping region. the toolkit will then draw objects #2 and #3, which will be clipped according to the clipping polydraw and the clip mode specified by calling ClipMode property.

If value of ClipMode property is set to 0, no clipping will be performed.

See Also

Elements	RenderTextAsCurves property, AntiAliasingThreshold property, AntiAliasingDim property, AntiAliasingFilter property

Topics	Vector Images: Display Settings


ConvertFromEMFHandle method (Vector Control)

Visual C++ 4.0 example

Syntax	short ConvertFromEMFHandle (long hEMF);

Overview	Refer to Working with EMF and WMF Files

Remarks

(Vector Imaging Pro Only) Converts an enhanced Windows metafile (EMF) into a LEAD Technologies vector image. When this method is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.

See Also

Elements	ConvertFromWMFHandle method, ConvertFromEMFPicture Method, ConvertFromWMFPicture method, ConvertToEMFHandle method, ConvertToEMFPicture method, ConvertToWMFHandle method, ConvertToWMFPicture method


hEMF Parameter For ConvertFromEMFHandle
hEMF

Handle to an enhanced windows metafile to be converted.


Return for ConvertFromEMFHandle
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ConvertFromEMFPicture method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ConvertFromEMFPicture (IPictureDisp *pEMFPicture);

Overview	Refer to Working with EMF and WMF Files

Remarks

(Vector Imaging Pro Only) Converts an enhanced Windows metafile (EMF) into a Picture object. When this method is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.

This method is for Visual Basic only. For other environments, use the ConvertFromEMFHandle method.

See Also

Elements	ConvertFromWMFHandle method, ConvertFromEMFHandle method, ConvertFromWMFPicture method, ConvertToEMFHandle method, ConvertToEMFPicture method, ConvertToWMFHandle method, ConvertToWMFPicture method


pEMFPicture Parameter For ConvertFromEMFPicture
pEMFPicture

Handle to an enhanced windows metafile to be converted.


Return for ConvertFromEMFPicture
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ConvertFromWMFHandle method (Vector Control)

Visual C++ 4.0 example

Syntax	short ConvertFromWMFHandle (long hWMF);

Overview	Refer to Working with EMF and WMF Files

Remarks

(Vector Imaging Pro Only) Converts a Windows metafile (WMF) into a LEAD Technologies vector image. When this method is completed, there are two copies of the drawing in memory: the WMF and the original LEAD vector. Freeing one will not affect the other.

See Also

Elements	ConvertFromEMFPicture Method, ConvertFromEMFHandle method, ConvertFromWMFPicture method, ConvertToEMFHandle method, ConvertToEMFPicture method, ConvertToWMFHandle method, ConvertToWMFPicture method


hWMF Parameter For ConvertFromWMFHandle
hWMF

Handle to an enhanced windows metafile to be converted.


Return for ConvertFromWMFHandle
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ConvertFromWMFPicture method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ConvertFromWMFPicture (IPictureDisp *pWMFPicture);

Overview	Refer to Working with EMF and WMF Files

Remarks

(Vector Imaging Pro Only) Converts a Windows metafile (WMF) into a Picture object. When this method is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.

This method is for Visual Basic only. For other environments, use the ConvertFromWMFHandle method.

See Also

Elements	ConvertFromEMFPicture Method, ConvertFromEMFHandle method, ConvertFromWMFHandle method, ConvertToEMFHandle method, ConvertToEMFPicture method, ConvertToWMFHandle method, ConvertToWMFPicture method


pWMFPicture Parameter For ConvertFromWMFPicture
pWMFPicture

Handle to an enhanced windows metafile to be converted.


Return for ConvertFromWMFPicture
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ConvertToEMFHandle method (Vector Control)

Visual C++ 4.0 example

Syntax	long ConvertToEMFHandle (long lLeft, long lTop, long lRight, long lBottom, long nDPI);

Overview	Refer to Working with EMF and WMF Files

Remarks

Converts a LEAD Technologies vector into an enhanced Windows metafile (EMF). When this method is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.

This method allocates an EMF handle and copies the LEAD vector to the EMF.

This method will use the current camera and current viewport of the vector to do the necessary projection.

The rectangle formed by lLeft, lTop, lRight and lBottom specifies the dimensions (in .01-millimeter units) of the picture to be stored in the enhanced metafile. If you pass 0 for all 4 parameters, the vector toolkit computes the dimensions of the smallest rectangle that surrounds the vector drawing. For example:

ConvertToEMFHandle(0, 0, 1000, 1000, 96);

Will convert the vector drawing to an EMF file with logical size 0 to10mm in width and height.

The user should provide the DPI value to help the toolkit in calculating the dimensions of t he result output correctly.

This is very helpful when printing. For example, determine the printer's printable area in millimeters. Divide that value by 100, and pass the result to this method. The resulting EMF will have the same logical size as the printer, resulting in high image quality when finally printing the EMF file with PlayEnhMetaFile.

See Also

Elements	ConvertFromEMFPicture Method, ConvertFromEMFHandle method, ConvertFromWMFHandle method, ConvertFromWMFPicture method, ConvertToEMFPicture method, ConvertToWMFHandle method, ConvertToWMFPicture method


lLeft Parameter For ConvertToEMFHandle
lLeft

Left coordinate of the vector image to be converted to a Windows metafile.


Top Parameter For ConvertToEMFHandle
lTop

Top coordinate of the vector image to be converted to a Windows metafile.


Right Parameter For ConvertToEMFHandle
lRight

Right coordinate of the vector image to be converted to a Windows metafile.


Bottom Parameter For ConvertToEMFHandle
lBottom

Bottom coordinate of the vector image to be converted to a Windows metafile.


nDPI Parameter For ConvertToEMFHandle
nDPI

The nDPI parameter is Dots Per inch value that the toolkit will use to calculate the dimensions of the output EMF/WMF drawing.


Return for ConvertToEMFHandle
Return Value

Return	Meaning

!NULL	Handle to the created enhanced metafile (EMF) on success.

NULL	An error occurred.


ConvertToWMFHandle method (Vector Control)

Visual C++ 4.0 example

Syntax	long ConvertToWMFHandle (long lLeft, long lTop, long lRight, long lBottom, long nDPI);

Overview	Refer to Working with EMF and WMF Files

Remarks

Converts a LEAD Technologies vector into a Windows metafile (WMF). When this method is completed, there are two copies of the drawing in memory: the WMF and the original LEAD vector. Freeing one will not affect the other.

This method allocates a WMF handle and copies the LEAD vector to the WMF.

This method will use the current camera and current viewport of the vector to do the necessary projection.

The rectangle formed by lLeft, lTop, lRight and lBottom specifies the dimensions (in .01-millimeter units) of the picture to be stored in the enhanced metafile. If you pass 0 for all 4 parameters, the vector toolkit computes the dimensions of the smallest rectangle that surrounds the vector drawing. For example:

ConvertToWMFHandle(0, 0, 1000, 1000, 96);

Will convert the vector drawing to a WMF file with logical size 0 to10mm in width and height. The user should provide the DPI value to help the toolkit in calculating the dimensions of the resulting output correctly.

This is very helpful when printing. For example, determine the printer's printable area in millimeters. Divide that value by 100, and pass the result to this method. The resulting WMF will have the same logical size as the printer, resulting in high image quality when finally printing the WMF file.

See Also

Elements	ConvertFromEMFPicture Method, ConvertFromEMFHandle method, ConvertFromWMFHandle method, ConvertFromWMFPicture method, ConvertToEMFPicture method, ConvertToEMFHandle method, ConvertToWMFPicture method


lLeft Parameter For ConvertToWMFHandle
lLeft

Left coordinate of the vector image to be converted to a Windows metafile.


Top Parameter For ConvertToWMFHandle
lTop

Top coordinate of the vector image to be converted to a Windows metafile.


Right Parameter For ConvertToWMFHandle
lRight

Right coordinate of the vector image to be converted to a Windows metafile.


Bottom Parameter For ConvertToWMFHandle
lBottom

Bottom coordinate of the vector image to be converted to a Windows metafile.


nDPI Parameter For ConvertToWMFHandle
nDPI

The nDPI parameter is Dots Per inch value that the toolkit will use to calculate the dimensions of the output EMF/WMF drawing.


Return for ConvertToWMFHandle
Return Value

Return	Meaning

!NULL	Handle to the created metafile (WMF) on success.

NULL	An error occurred.


ConvertToEMFPicture method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	IPictureDisp* ConvertToEMFPicture (long lLeft, long lTop, long lRight, long lBottom, long nDPI);

Overview	Refer to Working with EMF and WMF Files

Remarks

Converts a LEAD Technologies vector into an enhanced Windows metafile (EMF). When this method is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.

This method allocates an EMF handle and copies the LEAD vector to the EMF.

This method will use the current camera and current viewport of the vector to do the necessary projection.

This method is for Visual Basic only. For other environments, use ConvertToEMFHandle.

The rectangle formed by lLeft, lTop, lRight and lBottom specifies the dimensions (in .01-millimeter units) of the picture to be stored in the enhanced metafile. If you pass 0 for all 4 parameters, the vector toolkit computes the dimensions of the smallest rectangle that surrounds the vector drawing. For example:

ConvertToEMFPicture(0, 0, 1000, 1000, 96);

Will convert the vector drawing to an EMF file with logical size 0 to10mm in width and height. The user should provide the DPI value to help the toolkit in calculating the dimensions of the resulting output correctly.

This is very helpful when printing. For example, determine the printer's printable area in millimeters. Divide that value by 100, and pass the result to this method. The resulting EMF will have the same logical size as the printer, resulting in high image quality when finally printing the EMF file.

See Also

Elements	ConvertFromEMFPicture Method, ConvertFromEMFHandle method, ConvertFromWMFHandle method, ConvertFromWMFPicture method, ConvertToWMFHandle method, ConvertToEMFHandle method, ConvertToWMFPicture method


lLeft Parameter For ConvertToEMFPicture
lLeft

Left coordinate of the vector image to be converted to a Windows metafile.


Top Parameter For ConvertToEMFPicture
lTop

Top coordinate of the vector image to be converted to a Windows metafile.


Right Parameter For ConvertToEMFPicture
lRight

Right coordinate of the vector image to be converted to a Windows metafile.


Bottom Parameter For ConvertToEMFPicture
lBottom

Bottom coordinate of the vector image to be converted to a Windows metafile.


nDPI Parameter For ConvertToEMFPicture
nDPI

The nDPI parameter is Dots Per inch value that the toolkit will use to calculate the dimensions of the output EMF/WMF drawing.


Return for ConvertToEMFPicture
Return Value

Return	Meaning

!NULL	A picture object.

NULL	An error occurred.


ConvertToWMFPicture method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	IPictureDisp* ConvertToWMFHandle (long lLeft, long lTop, long lRight, long lBottom, long nDPI);

Overview	Refer to Working with EMF and WMF Files

Remarks

Converts a LEAD Technologies vector into a Windows metafile (WMF). When this method is completed, there are two copies of the drawing in memory: the WMF and the original LEAD vector. Freeing one will not affect the other.

This method allocates a WMF handle and copies the LEAD vector to the WMF.

This method will use the current camera and current viewport of the vector to do the necessary projection.

This method is for Visual Basic only. For other environments, use ConvertToEMFHandle.

The rectangle formed by lLeft, lTop, lRight and lBottom specifies the dimensions (in .01-millimeter units) of the picture to be stored in the enhanced metafile. If you pass 0 for all 4 parameters, the vector toolkit computes the dimensions of the smallest rectangle that surrounds the vector drawing. For example:

ConvertToWMFPicture(0, 0, 1000, 1000, 96);

Will convert the vector drawing to a WMF file with logical size 0 to10mm in width and height. The user should provide the DPI value to help the toolkit in calculating the dimensions of the resulting output correctly.

This is very helpful when printing. For example, determine the printer's printable area in millimeters. Divide that value by 100, and pass the result to this method. The resulting WMF will have the same logical size as the printer, resulting in high image quality when finally printing the WMF file.

See Also

Elements	ConvertFromEMFPicture Method, ConvertFromEMFHandle method, ConvertFromWMFHandle method, ConvertFromWMFPicture method, ConvertToWMFHandle method, ConvertToEMFHandle method, ConvertToEMFPicture method


lLeft Parameter For ConvertToWMFPicture
lLeft

Left coordinate of the vector image to be converted to a Windows metafile.


Top Parameter For ConvertToWMFPicture
lTop

Top coordinate of the vector image to be converted to a Windows metafile.


Right Parameter For ConvertToWMFPicture
lRight

Right coordinate of the vector image to be converted to a Windows metafile.


Bottom Parameter For ConvertToWMFPicture
lBottom

Bottom coordinate of the vector image to be converted to a Windows metafile.


nDPI Parameter For ConvertToWMFPicture
nDPI

The nDPI parameter is Dots Per inch value that the toolkit will use to calculate the dimensions of the output EMF/WMF drawing.


Return for ConvertToWMFPicture
Return Value

Return	Meaning

!NULL	A Picture object.

NULL	An error occurred.


Copy method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short Copy (long nFlags);

Overview	Refer to Using the Clipboard

Remarks

Copies vector data from the current vector handle to the clipboard.

To determine whether there is valid vector data on the clipboard, call the ClipboardReady method.

To copy vector data to a vector handle, from the clipboard, call the Paste method.

See Also

Elements	Paste method, ClipboardReady method

Topics	Using the Clipboard


nFlags Parameter For Copy
nFlags

Flag that indicates the objects to copy. Possible values are:

Value	Meaning

0	Copy all layers and objects from the current vector handle to the clipboard.

VECTOR_FLAGS_SELECTED_ONLY	Copy only selected objects from the current vector handle to the clipboard.


Return for Copy
Return Value

Return 	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


CopyFlags property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long CopyFlags

Overview	Refer to Working with Vector Handles

Remarks

Flags that determine how a vector will be copied, when assigning it to the Vector property. Possible values are:

Value	Meaning

0	Copy the entire vector handle to the Vector property.

VECTOR_FLAGS_SELECTED_ONLY	Copy only selected objects to the Vector property.

VECTOR_FLAGS_RENAME_DUPLICATES	Rename duplicate layer names if found. This flag is only valid when VECTOR_FLAGS_REPLACE is not specified. The toolkit will add a suffix (0, 1, 2, etc) to the layer name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.

VECTOR_FLAGS_COPY_INTO_ACTIVE_LAYER	Copies objects and layers into the active layer of the vector in the Vector property.

VECTOR_FLAGS_COPY_LAYERS_ONLY	Copies all layers and objects from the source vector to the Vector property. TransformationC4, camera, viewport and all other properties of the Vector property will not be effected.

See Also

Elements	Vector property

Topics	Getting/Setting Vector Handle Information


CopyGroup method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short CopyGroup (long nGroupDstIndex, long hVectorSrc, long nGroupSrcIndex, short nFlags);

Overview	Refer to Working with Vector Groups

Remarks

(Vector Imaging Pro Only) Copies the contents of one group to another.

The source vector group to be copied is specified by nGroupSrcIndex. The vector that contains the source vector group is given by hVectorSrc. The destination vector is the vector control that calls this method. The group in which to copy the vector group is given by nGroupDstIndex.

The destination group can be in the same vector handle as the source group, or it can be in a different vector handle.

See Also

Functions:	GetGroupByIndex method, GetGroupByName method, AddGroup method, ILEADVectorGroup::Delete method, ILEADVectorGroup::Empty method, ILEADVectorObject::InsertInGroup method

Topics:	Vector Images: Grouping Vector Objects


nGroupDstIndex Parameter For CopyGroup
nGroupDstIndex

Index of the group in which to copy the source group.


hVectorSrc Parameter For CopyGroup
hVectorSrc

Handle to the source vector.


nGroupSrcIndex Parameter For CopyGroup
nGroupSrcIndex

Index of the source group to copy.


nFlags Parameter For CopyGroup
nFlags

Flag that indicates whether to empty the destination group before copying. Possible values are:

Value	Meaning

0	Do not empty the destination group before copying.

VECTOR_FLAGS_REPLACE	Empty the destination group before copying.


Return for CopyGroup
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


CopyLayer method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short CopyLayer (long nLayerDstIndex, long hVectorSrc, long nLayerSrcIndex, short nFlags);

Overview	Refer to Working with Vector Layers

Remarks

(Vector Imaging Pro Only) Copies the contents of one layer to another.

The source vector layer to be copied is specified by nLayerSrcIndex. The vector that contains the source vector layer is given by hVectorSrc. The destination vector is the vector control that calls this method. The layer in which to copy the vector layer is given by nLayerDstIndex.

The destination layer can be in the same vector handle as the source layer, or it can be in a different vector handle.

See Also

Elements	CopyObject method

Topics	Getting/Setting Vector Layer Information


nLayerDstIndex Parameter For CopyLayer
nLayerDstIndex

Index of the layer in which to copy the source layer. Pass -1 to copy the source layer into the active layer.


hVectorSrc Parameter For CopyLayer
hVectorSrc

Handle to the source vector.


nLayerSrcIndex Parameter For CopyLayer
nLayerSrcIndex

Index of the source layer to copy. Pass -1 to copy the active layer into the destination layer.


nFlags Parameter For CopyLayer
nFlags

Flag that indicates whether or not to empty the destination layer before copying. Possible values are:

Value	Meaning

0	Do not empty the destination layer before copying.

VECTOR_FLAGS_REPLACE	Empty the destination layer before copying.


Return for CopyLayer
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


CopyObject method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short CopyObject (long hObjectSrc, long hVectorSrc, long nLayerDstIndex);

Overview	Refer to Working with Vector Objects

Remarks

(Vector Imaging Pro Only) Copies the source vector object into the destination vector and layer. The source vector object to be copied is specified by hObjectSrc. The vector that contains the source vector object is given by hVectorSrc. The destination vector is the vector control that calls this method. The layer in which to copy the vector object is given by nLayerDstIndex.

Calling this method will create a new object that is a duplicate of the source object, but they are not related. The source object can be deleted after the copying process without affecting the newly copied object.

See Also

Elements	CopyLayer method

Topics	Modifying Object Characteristics


hObjectSrc Parameter For CopyObject
hObjectSrc

Handle to the source object.


hVectorSrc Parameter For CopyObject
hVectorSrc

Handle to the source vector.


nLayerDstIndex Parameter For CopyObject
nLayerDstIndex

Index of the layer in which to copy the object. Pass -1 to copy the object into the active layer.


Return for CopyObject
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


CurrentObject property (Vector Control)

Visual Basic example   Visual C++ 4.0 example
Visual Basic example   Visual C++ 4.0 example
Visual Basic example   Visual C++ 4.0 example

Syntax	ILEADVectorObject* CurrentObject

Overview	Refer to Working with Vector Objects

Remarks

The handle to the current object.

Use this to access an object in the VectorObjects event.

For more information about the properties and methods of the ILEADVectorObject interface, refer to Vector Interfaces.

See Also

Elements	EnumObjects method, VectorObjects event


DblClick event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void DblClick ();

Overview	Refer to Working with the Mouse and the Keyboard.

Remarks

Occurs when the user double-clicks a mouse button over the Main Control.

This is one of four events that occur in the following order when the user double-clicks a mouse button:

1.	MouseDown event

2.	Click event

3.	MouseUp event

4.	DblClick event

The MouseDown and MouseUp events let you check which mouse button is pressed.

See Also

Elements	Click event, MouseDown event, MouseMove event, MouseUp event


DeleteObjects method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short DeleteObjects (long nFlag);

Overview	Refer to Working with Vector Objects

Remarks

(Vector Imaging Pro Only) Deletes one or more vector objects from a vector handle.

Note: When you delete a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind vertices mode set in the VertexBindMode property.

Note: In DirectX, you cannot delete objects, therefore this method does nothing.

See Also

Elements	VertexBindMode property

Topics	Modifying Object Characteristics


nFlag Parameter For DeleteObjects
nFlag

Flag that indicates which objects to delete. Possible values are:

Value	Meaning

0	Delete all objects in the current vector handle.

VECTOR_FLAGS_SELECTED_ONLY	Delete only the selected objects.


Return for DeleteObjects
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Dlg3DOptionsAmbientColor property (Vector Control)

This property has been removed. Refer to the following:

ShowRenderDlg method

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property


Dlg3DOptionsPolygonMode property (Vector Control)

This property has been removed. Refer to the following:

ShowRenderDlg method

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property


Dlg3DOptionsUseLights property (Vector Control)

This property has been removed. Refer to the following:

ShowRenderDlg method

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property


EditLayerDlgActiveLayer property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL EditLayerDlgActiveLayer

Overview	Refer to Vector Dialogs

Remarks

Contains a value that indicates whether or not to edit the active layer. The value present in this property, when the ShowEditLayerDlg method is called, is used to initialize the dialog. If this property is not set prior to calling the ShowEditLayerDlg method, the value used to initialize the dialog will be the default value FALSE. When the ShowEditLayerDlg method returns, this property is updated with the value entered through the dialog.

Possible values are:

Value	Meaning

TRUE	Edit the active layer.

FALSE	Do not edit the active layer.

See Also

Elements	ShowEditLayerDlg method

Topics	Using Vector Dialogs


Empty method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short Empty ();

Overview	Refer to Working with Vector Handles

Remarks

(Vector Imaging Pro Only) Deletes all layers and objects from the current vector handle.

Calling this method will not affect other settings such as camera, transformation, etc.

See Also

Elements	IsEmpty method

Topics	Getting/Setting Vector Handle Information


Return for Empty
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


EnableDlgHelpButton property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL EnableDlgHelpButton

Overview	Refer to Help support

Remarks

Specifies whether to activate the vector common dialogs' help button. To enable contact-sensitive help support, and to use the vector common dialogs' help button, the EnableHelp property should be set to TRUE. Possible values are:

Setting	Description

TRUE 	Activate the help button.

FALSE	Do not activate the help button.

See Also

Elements	Help event, EnableHelp property

Topics	Vector Images: Implementing Help Support


EnableHelp property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL EnableHelp

Overview	Refer to Help support

Remarks

Specifies whether to activate the context sensitive help support.

Setting	Description

TRUE 	Activate the context sensitive help.

FALSE	Do not activate the context sensitive help.

See Also

Elements	Help event, EnableDlgHelpButton property

Topics	Vector Images: Implementing Help Support


EnableMethodErrors property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL EnableMethodErrors

Overview	Refer to General Support.

Remarks

(Persistent property, available at design time) Specifies whether LEADTOOLS generates system error events (in addition to error return codes).

Setting	Description

TRUE 	Generate system error events.

FALSE	Do not generate system error events.


EnableUndo method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short EnableUndo (VARIANT_BOOL bEnable);

Overview	Refer to Undoing and Redoing Automation Operations

Remarks

Disables or re-enables the undo feature of the automation container.

This method sets an internal automation counter that determines whether the undo feature should be displayed. The undo feature is on only if this counter is greater than or equal to 0. The initial value is 0.

Use this method along with the AddUndoNode method to combine multiple operations into a single undo call. For more information on this process, refer to the AddUndoNode method.

See Also

Elements	AddUndoNode method, UndoLevel property, Undo method, CanUndo method

Topics:	Vector Automation: Undoing/Redoing Operations


bEnable Parameter For EnableUndo
bEnable

Flag that indicates whether to enable or disable the undo feature of the specified automation handle. By enabling or disabling the undo feature, the internal undo counter is incremented or decremented. Possible values are:

Value	Meaning

TRUE	Enable the undo feature and increment the internal undo counter by one.

FALSE	Disable the undo feature and decrement the internal undo counter by one.


Returns For EnableUndo
Return Value

Return	Meaning

0	The method was successful.

<> 0	An error occurred. Refer to Error Codes.


EnumGroups method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short EnumGroups ()

Overview	Refer to Working with Vector Groups

Remarks

Enumerates all groups inside the current vector handle.

For each group enumerated in the current vector handle, a VectorGroups event is triggered.

See Also

Functions:	VectorGroups event, GetGroupByIndex method, GetGroupByName method, CopyGroup method, AddGroup method, ILEADVectorGroup::Delete method, ILEADVectorGroup::Empty method, ILEADVectorObject::InsertInGroup method

Topics:	Vector Images: Grouping Vector Objects


Return for EnumGroups
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


EnumLayers method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short EnumLayers ();

Overview	Refer to Working with Vector Layers

Remarks

Enumerates all layers inside the current vector handle.

For each layer enumerated in the current vector handle, a VectorLayers event is triggered.

See Also

Elements	VectorLayers event

Topics	Getting/Setting Vector Layer Information


Return for EnumLayers
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


EnumObjects method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short EnumObjects (short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Enumerates all objects within the vector.

The VectorObjects event will be called for each object in the vector.

Note: In DirectX, you cannot enumerate objects, therefore this method will do nothing.

See Also

Elements	VectorObjects event, CurrentObject property


nFlag Parameter For EnumObjects
nFlag

Flag that indicates which objects to enumerate. Possible values are:

Value	Meaning

0	Enumerates all objects in the vector handle.

VECTOR_FLAGS_SELECTED_ONLY	Enumerates selected objects in the vector handle.


Return for EnumObjects
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


EnumVertices method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short EnumVertices (short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Enumerates all vertices within the vector.

The VectorVertices event will be called for each vertex in the vector.

Note: In DirectX, you cannot enumerate vertices, therefore this method will do nothing.

See Also

Elements	VectorVertices event


nFlag Parameter For EnumVertices
nFlag

Flag that indicates which vertices to enumerate. Possible values are:

Value	Meaning

0	Enumerates all vertices in the vector handle.

VECTOR_FLAGS_SELECTED_ONLY	Enumerates the vertices of selected objects in the vector handle.


Return for EnumVertices
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ExplodeObjects method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ExplodeObjects (long nFlag);

Overview	Refer to Working with Vector Objects

Remarks

(Vector Imaging Pro Only) Explodes a vector object or objects to smaller parts.

Below is a list of object types and the objects into which they explode, if VECTOR_FLAGS_EXPLODE_TO_LINES is not specified:

Object type	After ExplodeObjects

VECTOR_VERTEX	Same.

VECTOR_LINE	Same.

VECTOR_RECTANGLE	4 VECTOR_LINE's.

VECTOR_POLYLINE	nPointCount of VECTOR_LINE's.

VECTOR_POLYBEZIER	Same.

VECTOR_POLYGON	Same.

VECTOR_ELLIPSE	Same.

VECTOR_CIRCLE	Same.

VECTOR_ARC	Same.

VECTOR_ELLIPTICALARC	Same.

VECTOR_TEXT	Same.

VECTOR_PIE	Same.

VECTOR_CHORD	Same.

VECTOR_POLYDRAW	Same.

VECTOR_RASTER	Same.

See Also

Topics	Modifying Object Characteristics


nFlag Parameter For ExplodeObjects
nFlag

Flag that indicates which objects to explode. Possible values are:

Value	Meaning

0	Explode all objects in the current vector handle.

VECTOR_FLAGS_SELECTED_ONLY	Explode only selected objects in the vector handle.

VECTOR_FLAGS_EXPLODE_TO_LINES	Explode objects into lines.


Return for ExplodeObjects
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


FeedLoad method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short FeedLoad (VARIANT vBuffer, long iSize);

Overview	Refer to Loading and Saving Vectors

Remarks

Supplies image data to the file-load process from a buffer that you provide.

Support for vector images is available only in those products that include the Vector features. For a list of those products, refer to LEADTOOLS Products.

Use this method with the StartFeedLoad method and the StopFeedLoad method. For a description of how the methods relate to each other, refer to the StartFeedLoad method.

See Also

Elements	StartFeedLoad method, StopFeedLoad method


vBuffer Parameter For FeedLoad
vBuffer

Your buffer, defined as an array of bytes.


iSize Parameter For FeedLoad
iSize

The size of your buffer.


Return for FeedLoad
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ForceRepaint method (Vector Control)

Visual Basic example     Visual C++ 4.0 example

Syntax	void ForceRepaint ();

Overview	Refer to Viewing a Vector Image

Remarks

Repaints the vector on the screen.

See Also

Elements	AutoRepaint property


Return for ForceRepaint
Return Value

None.


Free method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short Free ();

Overview	Refer to Working with Vector Objects

Remarks

Frees the currently loaded vector image.


Return for Free
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


GetActiveLayer method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	ILEADVectorLayer GetActiveLayer ();

Overview	Refer to Working with Vector Layers

Remarks

Gets the current active layer.

Some methods will use the active layer -1 is passed certain parameters.

To change the settings of a vector layer, retrieve a handle to the vector layer using the GetActiveLayer, GetLayerByIndex or GetLayerByName methods and then change the desired settings through the ILEADVectorLayer interface.

For more information about the ILEADVectorLayer interface, refer to Vector Interfaces.

See Also

Elements	GetLayerByName method, GetLayerByIndex method

Topics	Getting/Setting Vector Layer Information


Return for GetActiveLayer
Return Value

An ILEADVectorLayer interface that references the current active vector layer.


GetDlgString method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BSTR GetDlgString (long nString);

Overview	Refer to Vector Dialogs

Remarks

Returns the current string at the specified index. For a list if strings, refer to Dialog Strings.

To modify the text strings you can use the SetDlgString method.

See Also

Elements	SetDlgString method

Using Vector Dialogs


nString Parameter For GetDlgString
nString

Index of the string to get.


Return for GetDlgString
Return Value

Return	Meaning

>0	The current string at the specified index.

0	An error occurred.


GetGroupByIndex method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	ILEADVectorGroup* GetGroupByIndex (long nIndex);

Overview	Refer to Working with Vector Groups

Remarks

Gets the group at the specified index, in the current vector handle.

To determine the number of groups in a vector handle, check the GroupCount property.

To get a group, given the name of the group, call the GetGroupByName method.

To change the settings of a vector group, retrieve a handle to the vector group using the GetGroupByIndex or GetGroupByName methods and then change the desired settings through the ILEADVectorGroup interface.

For more information about the ILEADVectorGroup interface, refer to Vector Interfaces.

See Also

Functions:	GetGroupByName method, GroupCount property, CopyGroup method, AddGroup method, ILEADVectorGroup::Delete method, ILEADVectorGroup::Empty method, ILEADVectorObject::InsertInGroup method

Topics:	Vector Images: Grouping Vector Objects


nIndex Parameter For GetGroupByIndex
nIndex

Index of the group to retrieve.


Return for GetGroupByIndex
Return Value

An ILEADVectorGroup interface that references the vector group at the specified index.


GetGroupByName method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	ILEADVectorGroup* GetGroupByName (BSTR pszName);

Overview	Refer to Working with Vector Groups

Remarks

Gets the group with the specified name, in the current vector handle.

If two or more groups in a vector handle have the same name, this method will get the first group found.

To change the settings of a vector group, retrieve a handle to the vector group using the GetGroupByIndex or GetGroupByName methods and then change the desired settings through the ILEADVectorGroup interface.

For more information about the ILEADVectorGroup interface, refer to Vector Interfaces.

See Also

Functions:	GetGroupByIndex method, GroupCount property, CopyGroup method, AddGroup method, ILEADVectorGroup::Delete method, ILEADVectorGroup::Empty method, ILEADVectorObject::InsertInGroup method

Topics:	Vector Images: Grouping Vector Objects


pszName Parameter For GetGroupByName
pszName

String that contains the name of the group to retrieve.


Return for GetGroupByName
Return Value

An ILEADVectorGroup interface that references the vector group with the specified name.


GetLayerByIndex method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	ILEADVectorLayer GetLayerByIndex (long nIndex);

Overview	Refer to Working with Vector Layers

Remarks

Gets the layer at the specified index, in the current vector handle.

To determine the number of layers in a vector handle, check the LayerCount property.

To get a layer, given the name of the layer, call the GetLayerByName method.

To change the settings of a vector layer, retrieve a handle to the vector layer using the GetActiveLayer, GetLayerByIndex or GetLayerByName methods and then change the desired settings through the ILEADVectorLayer interface.

For more information about the ILEADVectorLayer interface, refer to Vector Interfaces.

See Also

Elements	GetLayerByName method, GetActiveLayer method

Topics	Getting/Setting Vector Layer Information


nIndex Parameter For GetLayerByIndex
nIndex

Index of the layer to retrieve.


Return for GetLayerByIndex
Return Value

An ILEADVectorLayer interface that references the vector layer at the specified index.


GetLayerByName method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	ILEADVectorLayer GetLayerByName (BSTR pszName);

Overview	Refer to Working with Vector Layers

Remarks

Gets the layer with the specified name, in the current vector handle.

If two or more layers in a vector handle have the same name, this method will get the first layer found.

To change the settings of a vector layer, retrieve a handle to the vector layer using the GetActiveLayer, GetLayerByIndex or GetLayerByName methods and then change the desired settings through the ILEADVectorLayer interface.

For more information about the ILEADVectorLayer interface, refer to Vector Interfaces.

See Also:

Elements	GetLayerByIndex method, GetActiveLayer method

Topics	Getting/Setting Vector Layer Information


pszName Parameter For GetLayerByName
pszName

String that contains the name of the layer to retrieve.


Return for GetLayerByName
Return Value

An ILEADVectorLayer interface that references the vector layer with the specified name.


GetObjectsParallelogram method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short GetObjectsParallelogram (short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Gets the parallelogram that contains the specified object(s).

Obtains the bounding parallelogram of a single object, several selected objects, or all objects within the specified vector handle.

This method is not supported in the DirectX engine.

This method updates the following properties:

ObjectParallelogramLeftTopX

ObjectParallelogramLeftTopY

ObjectParallelogramLeftTopZ

ObjectParallelogramRightBottomX

ObjectParallelogramRightBottomY

ObjectParallelogramRightBottomZ

See Also

Elements	ObjectParallelogramLeftTopX property, ObjectParallelogramLeftTopY property, ObjectParallelogramLeftTopZ property, ObjectParallelogramRightBottomX property, ObjectParallelogramRightBottomY property, ObjectParallelogramRightBottomZ property, GetObjectsRect method


nFlag Parameter For GetObjectsParallelogram
nFlag

Flag that indicates which objects to include when getting the bounding parallelogram. Possible values are:

Value	Meaning

VECTOR_ALL_OBJECTS	gets the parallelogram containing the entire drawing

VECTOR_SELECTED_OBJECTS	gets the parallelogram containing the selected objects {(0,0,0),(0,0,0)} if no objects are selected.

VECTOR_CURRENT_OBJECT	gets the parallelogram containing the current object


Return for GetObjectsParallelogram
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


GetObjectsRect method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short GetObjectsRect (short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Gets the rectangle that contains the specified object(s).

Obtains the bounding rectangle of a single object, several selected objects, or all objects within the specified vector.

This method is not supported in the DirectX engine.

This method updates the following properties:

ObjectRectLeft

ObjectRectTop

ObjectRectHeight

ObjectRectWidth

See Also

Elements	ObjectRectLeft property, ObjectRectTop property, ObjectRectHeight property, ObjectRectWidth property, GetObjectsParallelogram method


nFlag Parameter For GetObjectsRect
nFlag

Flag that indicates which objects to include when getting the bounding rectangle. Possible values are:

Value	Meaning

VECTOR_ALL_OBJECTS	gets the rectangle containing the entire drawing

VECTOR_SELECTED_OBJECTS	gets the rectangle containing the selected objects {(0,0,0),(0,0,0)} if no objects are selected.

VECTOR_CURRENT_OBJECT	gets the rectangle containing the current object


Return for GetObjectsRect
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


GroupCount property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long GroupCount

Overview	Refer to Working with Vector Groups

Remarks

(Read only) Gets the number of groups present in the current vector image.

Anytime a group is added or removed, this property is updated with the new group count.

See Also

Functions:	GetGroupByIndex method, GetGroupByName method, CopyGroup method, AddGroup method, ILEADVectorGroup::Delete method, ILEADVectorGroup::Empty method, ILEADVectorObject::InsertInGroup method

Topics:	Vector Images: Grouping Vector Objects


Help event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void Help(long nDlgID, long hElement, int nCtlID)

Overview	Refer to Help support

Remarks

This event is fired when the end-user requests help from the vector common dialogs. The end-user can request help in two ways, first using the question-mark button on the top right of each vector dialog, second using the help button associated with each vector dialog.

The Help event will be fired only if the EnableHelp property is set to TRUE. If not, no help events will be fired at all. Enabling help support gives the user the option to enable the dialog help button as well by setting the EnableDlgHelpButton property to TRUE

See Also

Elements	EnableDlgHelpButton property, EnableHelp property

Topics	Vector Images: Help Support


nDlgID Parameter For Help
nDlgID

Id of the vector common dialog that made the help request. Possible values are:

Value	Meaning

LVDLG_HELP_ALLGROUPS	[100] Help command message coming from ShowEditAllGroupsDlg method.

LVDLG_HELP_ALLLAYERS	[101] Help command message coming from ShowEditAllLayersDlg method.

LVDLG_HELP_GROUP	[102] Help command message coming from ShowEditGroupDlg method.

LVDLG_HELP_LAYER	[103] Help command message coming from ShowEditLayerDlg method.

LVDLG_HELP_HITTEST	[104] Help command message coming from ShowHitTestDlg method.

LVDLG_HELP_RENDER	[105] Help command message coming from ShowRenderDlg method.

LVDLG_HELP_ROTATE	[106] Help command message coming from ShowRotateDlg method.

LVDLG_HELP_SCALE	[107] Help command message coming from ShowScaleDlg method.

LVDLG_HELP_TRANSLATE	[108] Help command message coming from ShowTranslateDlg method.

LVDLG_HELP_CAMERA	[109] Help command message coming from ShowCameraDlg method.

LVDLG_HELP_VIEWMODE	[110] Help command message coming from ShowViewModeDlg method.

LVDLG_HELP_GENERAL	[111] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_PEN	[112] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_BRUSH	[113] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_VERTEX	[114] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_LINE	[115] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_RECTANGLE	[116] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_CIRCLE	[117] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_ELLIPSE	[118] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_POLYLINE	[119] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_POLYGON	[120] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_POLYDRAW	[121] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_POLYBEZIER	[122] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_ARC	[123] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_ELLIPTICALARC	[124] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_PIE	[125] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_TEXT	[126] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_RASTER	[127] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.

LVDLG_HELP_CLONE	[128] Help command message coming from ShowEditObjectDlg method or ShowNewObjectDlg method.


hElement Parameter For Help
hElement

Window handle of the dialog control that is requesting help information.  If the handle is 0, this means that the control that is requesting help information is the help button of a dialog.


nCtlID Parameter For Help
nCtlID

ID of the dialog control that is requesting help information.

This value is 0 if the Help event is fired from the dialog help button.  Possible values are:

Transform Dialog

LVDLG_IDD_TRANSFORM

LVDLG_IDC_TRANSFORM_BUTTON_XUP

LVDLG_IDC_TRANSFORM_EDIT_X

LVDLG_IDC_TRANSFORM_BUTTON_XDOWN

LVDLG_IDC_TRANSFORM_BUTTON_YUP

LVDLG_IDC_TRANSFORM_EDIT_Y

LVDLG_IDC_TRANSFORM_BUTTON_YDOWN

LVDLG_IDC_TRANSFORM_BUTTON_ZUP

LVDLG_IDC_TRANSFORM_EDIT_Z

LVDLG_IDC_TRANSFORM_BUTTON_ZDOWN

LVDLG_IDC_TRANSFORM_CHECK_ALL

LVDLG_IDC_TRANSFORM_BUTTON_RESET

LVDLG_IDC_TRANSFORM_STATIC_PREVIEW

LVDLG_IDC_TRANSFORM_CHECK_PREVIEW

LVDLG_IDC_TRANSFORM_UPDATE

LVDLG_IDC_TRANSFORM_BUTTON_HELP

Render Dialog

LVDLG_IDD_RENDER

LVDLG_IDC_RENDER_FRAME_LIGHTS

LVDLG_IDC_RENDER_CHECK_USELIGHTS

LVDLG_IDC_RENDER_BUTTON_AMBIENT

LVDLG_IDC_RENDER_FRAME_POLYGONMODE

LVDLG_IDC_RENDER_RADIO_POINT

LVDLG_IDC_RENDER_RADIO_LINE

LVDLG_IDC_RENDER_RADIO_FILL

LVDLG_IDC_RENDER_RADIO_FILL_RASTER_ALWAYS

LVDLG_IDC_RENDER_CHECK_PREVIEW

LVDLG_IDC_RENDER_STATIC_PREVIEW

LVDLG_IDC_RENDER_BUTTON_HELP

View Mode Dialog

LVDLG_IDD_VIEWMODE

LVDLG_IDC_VIEWMODE_FRAME_VIEWMODE

LVDLG_IDC_VIEWMODE_RADIO_FIT

LVDLG_IDC_VIEWMODE_RADIO_SNAP

LVDLG_IDC_VIEWMODE_CHECK_PREVIEW

LVDLG_IDC_VIEWMODE_STATIC_PREVIEW

LVDLG_IDC_VIEWMODE_BUTTON_HELP

Hit Test Dialog

LVDLG_IDD_HITTEST

LVDLG_IDC_HITTEST_FRAME_DISTANCE

LVDLG_IDC_HITTEST_EDIT_DISTANCE

LVDLG_IDC_HITTEST_SPIN_DISTANCE

LVDLG_IDC_HITTEST_FRAME_OPTIONS

LVDLG_IDC_HITTEST_CHECK_CLOSEDFIGURES

LVDLG_IDC_HITTEST_CHECK_IGNORESELECTED

LVDLG_IDC_HITTEST_BUTTON_HELP

All Layers Dialog

LVDLG_IDD_ALLLAYERS

LVDLG_IDC_ALLLAYERS_LIST_LAYERS

LVDLG_IDC_ALLLAYERS_BUTTON_NEW

LVDLG_IDC_ALLLAYERS_BUTTON_EDIT

LVDLG_IDC_ALLLAYERS_BUTTON_DELETE

LVDLG_IDC_ALLLAYERS_YES

LVDLG_IDC_ALLLAYERS_NO

LVDLG_IDC_ALLLAYERS_NAME

LVDLG_IDC_ALLLAYERS_ACTIVE

LVDLG_IDC_ALLLAYERS_VISIBLE

LVDLG_IDC_ALLLAYERS_LOCKED

LVDLG_IDC_ALLLAYERS_BUTTON_HELP

Layer Dialog

LVDLG_IDD_LAYER

LVDLG_IDC_LAYER_FRAME_NAME

LVDLG_IDC_LAYER_EDIT_NAME

LVDLG_IDC_LAYER_CHECK_ACTIVE

LVDLG_IDC_LAYER_CHECK_VISIBLE

LVDLG_IDC_LAYER_CHECK_LOCKED

LVDLG_IDC_LAYER_BUTTON_HELP

All Groups Dialog

LVDLG_IDD_ALLGROUPS

LVDLG_IDC_ALLGROUPS_BUTTON_NEW

LVDLG_IDC_ALLGROUPS_LIST_GROUPS

LVDLG_IDC_ALLGROUPS_BUTTON_EDIT

LVDLG_IDC_ALLGROUPS_BUTTON_DELETE

LVDLG_IDC_ALLGROUPS_BUTTON_HELP

Group Dialog

LVDLG_IDD_GROUP

LVDLG_IDC_GROUP_FRAME_NAME

LVDLG_IDC_GROUP_EDIT_NAME

LVDLG_IDC_GROUP_BUTTON_HELP

General Dialog

LVDLG_IDD_GENERAL

LVDLG_IDC_GENERAL_FRAME_SELECTION

LVDLG_IDC_GENERAL_CHECK_SELECTION

LVDLG_IDC_GENERAL_FRAME_RASTEROPERATION

LVDLG_IDC_GENERAL_COMBO_ROP

LVDLG_IDC_GENERAL_FRAME_CLIPPING

Pen Dialog

LVDLG_IDD_PEN

LVDLG_IDC_PEN_FRAME_STYLE

LVDLG_IDC_PEN_COMBO_STYLE

LVDLG_IDC_PEN_FRAME_WIDTH

LVDLG_IDC_PEN_EDIT_WIDTH

LVDLG_IDC_PEN_SPIN_WIDTH

LVDLG_IDC_PEN_FRAME_COLOR

LVDLG_IDC_PEN_STATIC_COLOR

LVDLG_IDC_PEN_BUTTON_COLOR

Brush Dialog

LVDLG_IDD_BRUSH

LVDLG_IDC_BRUSH_FRAME_STYLE

LVDLG_IDC_BRUSH_COMBO_STYLE

LVDLG_IDC_BRUSH_FRAME_HATCH

LVDLG_IDC_BRUSH_COMBO_HATCH

LVDLG_IDC_BRUSH_FRAME_COLOR

LVDLG_IDC_BRUSH_STATIC_COLOR

LVDLG_IDC_BRUSH_BUTTON_COLOR

LVDLG_IDC_BRUSH_CHECK_ODDEVEN

Vertex Dialog

LVDLG_IDD_VERTEX

LVDLG_IDC_VERTEX_FRAME_LOCATION

LVDLG_IDC_VERTEX_EDIT_X

LVDLG_IDC_VERTEX_EDIT_Y

LVDLG_IDC_VERTEX_EDIT_Z

Line Dialog

LVDLG_IDD_LINE

LVDLG_IDC_LINE_FRAME_STARTPOINT

LVDLG_IDC_LINE_EDIT_START_X

LVDLG_IDC_LINE_EDIT_START_Y

LVDLG_IDC_LINE_EDIT_START_Z

LVDLG_IDC_LINE_FRAME_ENDPOINT

LVDLG_IDC_LINE_EDIT_END_X

LVDLG_IDC_LINE_EDIT_END_Y

LVDLG_IDC_LINE_EDIT_END_Z

Rectangle Dialog

LVDLG_IDD_RECTANGLE

LVDLG_IDC_RECTANGLE_FRAME_STARTPOINT

LVDLG_IDC_RECTANGLE_EDIT_START_X

LVDLG_IDC_RECTANGLE_EDIT_START_Y

LVDLG_IDC_RECTANGLE_EDIT_START_Z

LVDLG_IDC_RECTANGLE_FRAME_ENDPOINT

LVDLG_IDC_RECTANGLE_EDIT_END_X

LVDLG_IDC_RECTANGLE_EDIT_END_Y

LVDLG_IDC_RECTANGLE_EDIT_END_Z

Polyline Dialog

LVDLG_IDD_POLYLINE

LVDLG_IDC_POLYLINE_FRAME_POINTS

LVDLG_IDC_POLYLINE_EDIT_X

LVDLG_IDC_POLYLINE_EDIT_Y

LVDLG_IDC_POLYLINE_EDIT_Z

LVDLG_IDC_POLYLINE_BUTTON_FIRST

LVDLG_IDC_POLYLINE_BUTTON_PREVIOUS

LVDLG_IDC_POLYLINE_BUTTON_NEXT

LVDLG_IDC_POLYLINE_BUTTON_LAST

LVDLG_IDC_POLYLINE_STATIC_POINT

LVDLG_IDC_POLYLINE_BUTTON_NEW

LVDLG_IDC_POLYLINE_BUTTON_DELETE

Polybezier Dialog

LVDLG_IDD_POLYBEZIER

LVDLG_IDC_POLYBEZIER_FRAME_POINTS

LVDLG_IDC_POLYBEZIER_EDIT_X

LVDLG_IDC_POLYBEZIER_EDIT_Y

LVDLG_IDC_POLYBEZIER_EDIT_Z

LVDLG_IDC_POLYBEZIER_BUTTON_FIRST

LVDLG_IDC_POLYBEZIER_BUTTON_PREVIOUS

LVDLG_IDC_POLYBEZIER_BUTTON_NEXT

LVDLG_IDC_POLYBEZIER_BUTTON_LAST

LVDLG_IDC_POLYBEZIER_STATIC_POINT

LVDLG_IDC_POLYBEZIER_BUTTON_NEW

LVDLG_IDC_POLYBEZIER_BUTTON_DELETE

Polygon Dialog

LVDLG_IDD_POLYGON

LVDLG_IDC_POLYGON_FRAME_POINTS

LVDLG_IDC_POLYGON_EDIT_X

LVDLG_IDC_POLYGON_EDIT_Y

LVDLG_IDC_POLYGON_EDIT_Z

LVDLG_IDC_POLYGON_BUTTON_FIRST

LVDLG_IDC_POLYGON_BUTTON_PREVIOUS

LVDLG_IDC_POLYGON_BUTTON_NEXT

LVDLG_IDC_POLYGON_BUTTON_LAST

LVDLG_IDC_POLYGON_BUTTON_NEW

LVDLG_IDC_POLYGON_BUTTON_DELETE

LVDLG_IDC_POLYGON_STATIC_POINT

LVDLG_IDC_POLYGON_FRAME_FILLMODE

LVDLG_IDC_POLYGON_RADIO_ALTERNATE

LVDLG_IDC_POLYGON_RADIO_WINDING

Ellipse Dialog

LVDLG_IDD_ELLIPSE

LVDLG_IDC_ELLIPSE_FRAME_CENTER

LVDLG_IDC_ELLIPSE_EDIT_X

LVDLG_IDC_ELLIPSE_EDIT_Y

LVDLG_IDC_ELLIPSE_EDIT_Z

LVDLG_IDC_ELLIPSE_FRAME_RADIUS

LVDLG_IDC_ELLIPSE_EDIT_RADIUSX

LVDLG_IDC_ELLIPSE_EDIT_RADIUSY

Circle Dialog

LVDLG_IDD_CIRCLE

LVDLG_IDC_CIRCLE_FRAME_CENTER

LVDLG_IDC_CIRCLE_EDIT_X

LVDLG_IDC_CIRCLE_EDIT_Y

LVDLG_IDC_CIRCLE_EDIT_Z

LVDLG_IDC_CIRCLE_FRAME_RADIUS

LVDLG_IDC_CIRCLE_EDIT_RADIUS

Arc Dialog

LVDLG_IDD_ARC

LVDLG_IDC_ARC_FRAME_CENTER

LVDLG_IDC_ARC_EDIT_X

LVDLG_IDC_ARC_EDIT_Y

LVDLG_IDC_ARC_EDIT_Z

LVDLG_IDC_ARC_FRAME_RADIUS

LVDLG_IDC_ARC_EDIT_RADIUS

LVDLG_IDC_ARC_FRAME_ANGLES

LVDLG_IDC_ARC_EDIT_START

LVDLG_IDC_ARC_STATIC_START

LVDLG_IDC_ARC_EDIT_SWEEP

LVDLG_IDC_ARC_STATIC_SWEEP

Text Dialog

LVDLG_IDD_TEXT

LVDLG_IDC_TEXT_FRAME_POINT

LVDLG_IDC_TEXT_EDIT_X

LVDLG_IDC_TEXT_EDIT_Y

LVDLG_IDC_TEXT_EDIT_Z

LVDLG_IDC_TEXT_FRAME_HORIZONTAL

LVDLG_IDC_TEXT_FRAME_VERTICAL

LVDLG_IDC_TEXT_COMBO_HORIZONTAL

LVDLG_IDC_TEXT_COMBO_VERTICAL

LVDLG_IDC_TEXT_CHECK_HITTESTRECTANGLE

LVDLG_IDC_TEXT_FRAME_TEXT

LVDLG_IDC_TEXT_EDIT_TEXT

LVDLG_IDC_TEXT_FRAME_FONT

LVDLG_IDC_TEXT_BUTTON_FONT

LVDLG_IDC_TEXT_EDIT_CHARHEIGHT

LVDLG_IDC_TEXT_EDIT_CHARWIDTH

LVDLG_IDC_TEXT_STATIC_CHARWIDTH

LVDLG_IDC_TEXT_STATIC_CHARHEIGHT

LVDLG_IDC_TEXT_CHECK_FORCELINECURVE

Pie Dialog

LVDLG_IDD_PIE

LVDLG_IDC_PIE_FRAME_CENTER

LVDLG_IDC_PIE_EDIT_X

LVDLG_IDC_PIE_EDIT_Y

LVDLG_IDC_PIE_EDIT_Z

LVDLG_IDC_PIE_FRAME_RADIUS

LVDLG_IDC_PIE_EDIT_RADIUS

LVDLG_IDC_PIE_FRAME_ANGLES

LVDLG_IDC_PIE_STATIC_START

LVDLG_IDC_PIE_EDIT_START

LVDLG_IDC_PIE_STATIC_SWEEP

LVDLG_IDC_PIE_EDIT_SWEEP

Polydraw Dialog

LVDLG_IDD_POLYDRAW

LVDLG_IDC_POLYDRAW_FRAME_POINTS

LVDLG_IDC_POLYDRAW_EDIT_X

LVDLG_IDC_POLYDRAW_EDIT_Y

LVDLG_IDC_POLYDRAW_EDIT_Z

LVDLG_IDC_POLYDRAW_BUTTON_FIRST

LVDLG_IDC_POLYDRAW_BUTTON_PREVIOUS

LVDLG_IDC_POLYDRAW_BUTTON_NEXT

LVDLG_IDC_POLYDRAW_BUTTON_LAST

LVDLG_IDC_POLYDRAW_STATIC_POINT

LVDLG_IDC_POLYDRAW_BUTTON_NEW

LVDLG_IDC_POLYDRAW_BUTTON_DELETE

LVDLG_IDC_POLYDRAW_FRAME_TYPE

LVDLG_IDC_POLYDRAW_CHECK_CLOSEFIGURE

LVDLG_IDC_POLYDRAW_COMBO_TYPE

Raster Dialog

LVDLG_IDD_RASTER

LVDLG_IDC_RASTER_FRAME_POINT1

LVDLG_IDC_RASTER_EDIT_POINT1_X

LVDLG_IDC_RASTER_EDIT_POINT1_Y

LVDLG_IDC_RASTER_EDIT_POINT1_Z

LVDLG_IDC_RASTER_FRAME_POINT2

LVDLG_IDC_RASTER_EDIT_POINT2_X

LVDLG_IDC_RASTER_EDIT_POINT2_Y

LVDLG_IDC_RASTER_EDIT_POINT2_Z

LVDLG_IDC_RASTER_FRAME_BITMAP

LVDLG_IDC_RASTER_STATIC_PREVIEW

LVDLG_IDC_RASTER_BUTTON_BITMAP

Clone Dialog

LVDLG_IDD_CLONE

LVDLG_IDC_CLONE_FRAME_POINT

LVDLG_IDC_CLONE_EDIT_X

LVDLG_IDC_CLONE_EDIT_Y

LVDLG_IDC_CLONE_EDIT_Z

LVDLG_IDC_CLONE_FRAME_SCALE

LVDLG_IDC_CLONE_EDIT_SCALEX

LVDLG_IDC_CLONE_EDIT_SCALEY

LVDLG_IDC_CLONE_EDIT_SCALEZ

LVDLG_IDC_CLONE_FRAME_ROTATION

LVDLG_IDC_CLONE_EDIT_ROTATIONX

LVDLG_IDC_CLONE_EDIT_ROTATIONY

LVDLG_IDC_CLONE_EDIT_ROTATIONZ

LVDLG_IDC_CLONE_FRAME_ATTRIBUTES

LVDLG_IDC_CLONE_CHECK_USEPEN

LVDLG_IDC_CLONE_CHECK_USEBRUSH

LVDLG_IDC_CLONE_CHECK_USEPOINTASORIGIN

LVDLG_IDC_CLONE_FRAME_GROUP

LVDLG_IDC_CLONE_LIST_GROUP

Elliptical Arc Dialog

LVDLG_IDD_ELLIPTICALARC

LVDLG_IDC_ELLIPTICALARC_FRAME_CENTER

LVDLG_IDC_ELLIPTICALARC_EDIT_X

LVDLG_IDC_ELLIPTICALARC_EDIT_Y

LVDLG_IDC_ELLIPTICALARC_EDIT_Z

LVDLG_IDC_ELLIPTICALARC_FRAME_ANGLES

LVDLG_IDC_ELLIPTICALARC_STATIC_START

LVDLG_IDC_ELLIPTICALARC_EDIT_START

LVDLG_IDC_ELLIPTICALARC_STATIC_SWEEP

LVDLG_IDC_ELLIPTICALARC_EDIT_SWEEP

LVDLG_IDC_ELLIPTICALARC_FRAME_RADIUS

LVDLG_IDC_ELLIPTICALARC_EDIT_RADIUSX

LVDLG_IDC_ELLIPTICALARC_EDIT_RADIUSY


HitTest method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL HitTest (double x, double y);

Overview	Refer to Working with Vector Objects

Remarks

Updates the CurrentObject with the vector object under the specified 2D point.

This method will update the CurrentObject property with the first object under the specified physical point.

Camera, view port, rotation, translation and scaling are all considered when determining whether or not an object is under the specified point.

This method is not supported in the DirectX engine, and will always return FALSE.

See Also

Elements	CurrentObject property


x Parameter For HitTest
x

Horizontal position of the location in question.


y Parameter For HitTest
y

Vertical position of the location in question.


Return for HitTest
Return Value

Return	Meaning

TRUE	An object exist at the specified point and the CurrentObject property has been updated.

FALSE	No item is present at the specified location.


HitTestDistance property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long HitTestDistance

Overview	Refer to Working with Vector Objects

Remarks

Contains a value that indicates how close the hit test point must be to an object in order to "hit" the object. The distance is given in pixels. The default is 4.

See Also

Elements	HitTestFlags property, HitTest method, HitTestDlgDistance property

Topics	Modifying Object Characteristics


HitTestDlgFlags property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long HitTestDlgFlags

Overview	Refer to Vector Dialogs

Remarks

Flag that determines which objects to consider when hit testing. The value present in this property when the ShowHitTestDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowHitTestDlg method, the value used to initialize the dialog will come from the HitTestFlags property of the vector handle. When the ShowHitTestDlg method returns, this property is updated with the value entered through the dialog.

Possible values are:

Value	Meaning

VECTOR_HITTEST_CLOSEDFIGURES	Determine whether the hit test point is inside closed objects.

VECTOR_HITTEST_IGNORESELECTED	Do not test objects that are already selected.

See Also

Elements	HitTestDlgDistance property, HitTestFlags property, ShowHitTestDlg method

Topics	Using Vector Dialogs


HitTestDlgDistance property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long HitTestDlgDistance

Overview	Refer to Vector Dialogs

Remarks

Flag that determines how close the hit test point must be to an object in order to "hit" the object. The value present in this property when the ShowHitTestDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowHitTestDlg method, the value used to initialize the dialog will come from the HitTestDistance property of the vector handle. When the ShowHitTestDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	HitTestDlgFlags property, HitTestDistance property, ShowHitTestDlg method

Topics	Using Vector Dialogs


HitTestFlags property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long HitTestFlags

Overview	Refer to Working with Vector Objects

Remarks

Flag that determines which objects to consider when hit testing.

Possible values are:

Value	Meaning

VECTOR_HITTEST_CLOSEDFIGURES	Determine whether the hit test point is inside closed objects.

VECTOR_HITTEST_IGNORESELECTED	Do not test objects that are already selected.

See Also

Elements	HitTest method, HitTestDlgDistance property, HitTestDlgFlags property

Topics	Modifying Object Characteristics


InvertColors method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	void InvertColors ()

Overview	Refer to Working with Vector Handles

Remarks

Inverts the colors in the vector handle.

See Also

Topics	Vector Images: Display Settings
Viewing a Vector Image


Is3D method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL Is3D (void);

Overview	Refer to Working with Vector Objects

Remarks

Returns a value that indicates whether an object is 3 dimensional or 2 dimensional.


Return for Is3D
Return Value

Return	Meaning

TRUE	The current vector image is 3 dimensional.

FALSE	The current vector image is 2 dimensional.


IsAnObjectHidden method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL IsAnObjectHidden (void);

Overview	Refer to Working with Vector Handles

Remarks

Returns a value that indicates whether a hidden object exists in the vector handle.

See Also

Elements	IsAnObjectSelected method


Return for IsAnObjectHidden
Return Value

Return	Meaning

TRUE	A hidden object exists in the vector handle.

FALSE	No hidden objects exist in the vector handle.


IsAnObjectSelected method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL IsAnObjectSelected (void);

Overview	Refer to Working with Vector Objects

Remarks

Returns a value that indicates whether or not an object is selected.

See Also

Elements	SelectAllObjects method


Return for IsAnObjectSelected
Return Value

Return	Meaning

TRUE	At least one object is currently selected.

FALSE	No objects are currently selected.


IsEmpty method (Vector Control)
IsEmpty method

Visual Basic Example   Visual C++ 4.0 Example

Syntax	VARIANT_BOOL IsEmpty ();

Overview	Refer to Working with Vector Handles

Remarks

Determines whether the current vector handle is empty.

A vector handle is considered empty when it has no objects.

An empty vector handle can still have empty layers.

See Also

Elements	Empty method

Topics	Getting/Setting Vector Handle Information


Return for IsEmpty
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


IsObjectsInsideParallelogram method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	VARIANT_BOOL IsObjectsInsideParallelogram (double x1, double y1, double z1, double x2, double y2, double z2, short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

The parallelogram is given in logical units.

For this method, the current view port, pan position, camera, rotation, translation and scale do not effect the actual image position in 3D space.

Not supported in OpenGL and DirectX.

See Also

Elements	IsObjectsInsideRect method

Topics	Modifying Object Characteristics


x1 Parameter For IsObjectsInsideParallelogram
x1

The X coordinate of the minimum point of the parallelogram.


y1 Parameter For IsObjectsInsideParallelogram
y1

The Y coordinate of the minimum point of the parallelogram.


z1 Parameter For IsObjectsInsideParallelogram
z1

The Z coordinate of the minimum point of the parallelogram.


x2 Parameter For IsObjectsInsideParallelogram
x2

The X coordinate of the maximum point of the parallelogram.


y2 Parameter For IsObjectsInsideParallelogram
y2

The Y coordinate of the maximum point of the parallelogram.


z2 Parameter For IsObjectsInsideParallelogram
z2

The Z coordinate of the maximum point of the parallelogram.


nFlag Parameter For IsObjectsInsideParallelogram
nFlag

Flag that indicates which objects to test. Possible values are:

Value	Meaning

0	Test all objects.

VECTOR_FLAGS_SELECTED_ONLY	Test only selected objects.


Return for IsObjectsInsideParallelogram
Return Value

Return	Meaning

TRUE	The object(s) is(are) inside the specified parallelogram.

FALSE	The object(s) is(are) not inside the specified parallelogram.


IsObjectsInsideRect method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	VARIANT_BOOL IsObjectsInsideRect (double fLeft, double fTop, double fWidth, double fHeight, short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

The rectangle is given in screen (physical) coordinates.

The current view port, pan position, camera, scale, translation and rotation values are all considered when determining whether the object is within the rectangle.

See Also

Elements	IsObjectsInsideParallelogram method

Topics	Modifying Object Characteristics


fLeft Parameter For IsObjectsInsideRect
fLeft

The X coordinate of the origin of the rectangle.


fTop Parameter For IsObjectsInsideRect
fTop

The Y coordinate of the origin of the rectangle.


fWidth Parameter For IsObjectsInsideRect
fWidth

The width of the rectangle.


fHeight Parameter For IsObjectsInsideRect
fHeight

The height of the rectangle.


nFlag Parameter For IsObjectsInsideRect
nFlag

Flag that indicates which objects to test. Possible values are:

Value	Meaning

0	Test all objects.

VECTOR_FLAGS_SELECTED_ONLY	Test only selected objects.


Return for IsObjectsInsideRect
Return Value

Return	Meaning

TRUE	The object(s) is(are) inside the specified rectangle.

FALSE	The object(s) is(are) not inside the specified rectangle.


IsSupportLocked method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL IsSupportLocked (short iType);

Overview	Refer to General Support.

Remarks

Indicates whether support is locked for an optional feature, such as LEADTOOLS Document/Medical capabilities.

For information about LEADTOOLS Document/Medical capabilities, contact LEAD.

To unlock a feature, use the UnlockSupport method.

See Also

Elements	UnlockSupport method


iType Parameter For IsSupportLocked
iType

The optional feature to check.

Value	Meaning
L_SUPPORT_BARCODES_1D	Support for reading and writing Linear bar codes. This is available in the LEADTOOLS 1D Module.
L_SUPPORT_BARCODES_PDF_READ	Support for reading PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (read).
L_SUPPORT_BARCODES_PDF_WRITE	Support for writing PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (write).
L_SUPPORT_BARCODES_DATAMATRIX_READ	Support for reading Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (read).
L_SUPPORT_BARCODES_DATAMATRIX_WRITE	Support for writing Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (write).
L_SUPPORT_BITONAL	Support for Scale to Gray and Favor Black processing.
L_SUPPORT_CMW	Support for the CMW file format, which uses Wavelet CMP compression.
L_SUPPORT_DICOM	DICOM file format support, but not the DICOM Communication support.
L_SUPPORT_DOCUMENT	LEADTOOLS Document features . A LEADTOOLS Document license is required
L_SUPPORT_EXTGRAY	Support for 12 bit grayscale, 16-bit grayscale, 48-bit color and 64-bit color image creation and manipulation.
L_SUPPORT_ICR	Support for the ICR Module within the OCR engine. This supports the recognition of handwritten text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_J2K	Unlocks support for JPEG2000 images. The support needs to be unlocked to read and write both types of JPEG 2000 images (JPEG 2000 stream and JP2 files).
L_SUPPORT_LTPRO	Support for advanced image processing functions only available in the Raster Pro and above toolkits.
L_SUPPORT_MEDICAL	Support for the capabilities unlocked by L_SUPPORT_DICOM and L_SUPPORT_EXTGRAY, plus all Medical features.
L_SUPPORT_MEDICAL_NET	Support for everything unlocked by L_SUPPORT_MEDICAL, plus support for the unsecure DICOM Network Communication for Message Exchange.
L_SUPPORT_OCR	Support for the OCR features. (Document/Medical).
L_SUPPORT_OCR_ASIAN	Support for the OCR engine to recognize Asian text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_OCR_PDF_OUTPUT	Support for saving OCR results as a PDF file. This license is in addition to the cost of the OCR Plugin or Document Imaging Suite.
L_SUPPORT_OMR	Support for the OMR Module within the OCR engine. This supports the recognition of check boxes. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_PDF	Support for the PDF, PS and EPS file formats. Available only in the LEADTOOLS PDF Plug in. If this support is locked, the PDF, PS and EPS files will not be loaded or saved.
L_SUPPORT_PDF_SAVE	Support for saving raster images as a PDF file. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_VECTOR	Support for the Vector Features and Vector file formats. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selection.


Return for IsSupportLocked
Return Value

Return	Meaning

TRUE	The optional feature is locked.

FALSE	The optional feature is available in your toolkit.


KeyDown event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void KeyDown (short* KeyCode, short Shift);

Overview	Refer to Working with the Mouse and Keyboard.

Remarks

Occurs when the user presses a key while the Main Control has the focus. (To interpret ANSI characters, use the KeyPress event.)

See Also

Elements	KeyUp event, KeyPress event


KeyCode Parameter For KeyDown
KeyCode

Each development system has its own way of handling key codes. The following topics provide a quick reference:

 Visual Basic Constants for Key Codes.

 Visual C++ Key Codes.


Shift Parameter For KeyDown
Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is pressed. The following are possible values:

Value	Meaning

1	SHIFT key

2	CTRL key

4	ALT key

3	CTRL/SHIFT key

5	ALT/SHIFT key

6	CTRL/ALT key

7	CTRL/ALT/SHIFT key


KeyPress event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void KeyPress (short* KeyAscii);

Overview	Refer to Working with the Mouse and Keyboard.

Remarks

Occurs when the user presses and releases an ANSI key.

See Also

Elements	KeyDown event, KeyUp event


KeyAscii Parameter For KeyPress
KeyAscii

The standard numeric ANSI keycode. KeyAscii is passed by reference; changing it sends a different character to the object.  Changing KeyAscii to 0 cancels the keystroke so that the object receives no character.


KeyUp event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void KeyUp (short* KeyCode, short Shift);

Overview	Refer to Working with the Mouse and Keyboard.

Remarks

Occurs when the user releases a key while an object has the focus. (To interpret ANSI characters, use the KeyPress event.)

See Also

Elements	KeyDown event, KeyPress event


KeyCode Parameter For KeyUp
KeyCode

Each development system has its own way of handling key codes. The following topics provide a quick reference:

 Visual Basic Constants for Key Codes.

 Visual C++ Key Codes.


Shift Parameter For KeyUp
Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is pressed. The following are possible values:

Value	Meaning

1	SHIFT key

2	CTRL key

4	ALT key

3	CTRL/SHIFT key

5	ALT/SHIFT key

6	CTRL/ALT key

7	CTRL/ALT/SHIFT key


LayerCount property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long LayerCount

Overview	Refer to Working with Vector Layers

Remarks

(Read only) Gets the number of layers present in the current vector image.

Anytime a layer is added or removed, this property is updated with the new layer count.

See Also:

Elements	AddLayer method

Topics	Getting/Setting Vector Layer Information


Load method (Vector Control)

Visual Basic example Visual C++ 4.0 example

Syntax	short Load (BSTR pszName,);

Overview	Refer to Loading and Saving Vectors

Remarks

Loads a vector from a file into the Vector Control. The file can be in any supported vector file format, whether compressed or uncompressed.

For supported formats, refer to Formats of Vector Input Files.

See Also

Elements	LoadMemory method, StartFeedLoad method, LoadArray method


pszName Parameter For Load
pszName

Character string containing the name of the file to load.


Return for Load
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


LoadArray method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short LoadArray (VARIANT *pvMem, long lSize);

Overview	Refer to Loading and Saving Vectors

Remarks

Loads a vector file from a byte array in memory. The file can be in any supported vector file format, whether compressed or uncompressed.

For supported formats, refer to Formats of Vector Input Files.

To save a vector to a file in memory, refer to the SaveArray method.

See Also

Elements	LoadMemory method, SaveArray method, SaveMemory method


pvMem Parameter For LoadArray
pvMem

A VARIANT byte array that contains a vector file in memory.


lSize Parameter For LoadArray
lSize

The size in bytes of the data stored in memory. If you use the SaveArray method to create the file in memory, you calculate the size using the following:

Size = UBound(variant) – LBound(variant) + 1


Return for LoadArray
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


LoadMemory method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short LoadMemory (long hMem, long lSize);

Overview	Refer to Loading and Saving Vectors

Remarks

Loads a vector file that is stored in memory. The file can be in any supported vector file format, whether compressed or uncompressed.

For supported formats, refer to Formats of Vector Input Files.

To save an image to a file in memory, refer to the SaveMemory method.

See Also

Elements	Load method, LoadArray method, StartFeedLoad method¸ StopFeedLoad method


hMem Parameter For LoadMemory
hMem

A handle to the file in memory. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


lSize Parameter For LoadMemory
lSize

The size in bytes of the file referenced by hMem. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


Return for LoadMemory
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Locked property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	VARIANT_BOOL Locked

Overview	Refer to Working with Vector Handles

Remarks

Locks or unlocks the current vector image loaded in the control. If a vector image is locked, it cannot be edited.

Locking a vector image has precedence over locking layers within the vector image. Therefore, if a vector image is locked, the layers within that vector image cannot be edited, even if the layers are not locked.

OpenGL and DirectX engines lock the vector image automatically.

To lock a layer, retrieve a handle to a vector layer using the GetLayerByName method, the GetLayerByIndex method or the GetActiveLayer method. Then, set the Locked property of the returned ILEADVectorLayer to TRUE.

For more information about the ILEADVectorLayer interface, refer to Vector Interfaces.

The Vector property contains a handle to the current vector image loaded in the control.

See Also

Elements	Vector property, GetActiveLayer method, GetLayerByName method, GetLayerByIndex method

Topics	Getting/Setting Vector Handle Information


LogicalToPhysical method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short LogicalToPhysical (double fLogX, double fLogY, double fLogZ);

Overview	Refer to Working with Vector Objects

Remarks

Converts a given logical point in the vector drawing (with X, Y, Z coordinates), into a physical 2D point.

Conversion will be based on the current view port and camera settings.

Not supported in DirectX.

This method updates the following properties:

PhysicalX property

PhysicalY property

See Also

Elements	PhysicalX property, PhysicalY property


fLogX Parameter For LogicalToPhysical
fLogX

X coordinate of a 3 dimensional logical point that will be converted into a 2 dimensional physical point.


fLogY Parameter For LogicalToPhysical
fLogY

Y coordinate of a 3 dimensional logical point that will be converted into a 2 dimensional physical point.


fLogZ Parameter For LogicalToPhysical
fLogZ

Z coordinate of a 3 dimensional logical point that will be converted into a 2 dimensional physical point.


Return for LogicalToPhysical
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


LogicalX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double LogicalX

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the X coordinate of the logical point that results from calling the PhysicalToLogical method.

See Also

Elements	LogicalY property, LogicalZ property, PhysicalToLogical method

Topics	Modifying Object Characteristics


LogicalY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double LogicalY

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the Y coordinate of the logical point that results from calling the PhysicalToLogical method.

See Also

Elements	LogicalX property, LogicalZ property, PhysicalToLogical method

Topics	Modifying Object Characteristics


LogicalZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double LogicalZ

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the Z coordinate of the logical point that results from calling the PhysicalToLogical method.

See Also

Elements	LogicalX property, LogicalY property, PhysicalToLogical method

Topics	Modifying Object Characteristics


MarkerBrushColor property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	OLE_COLOR MarkerBrushColor

Overview	Refer to Working with Vector Handles

Remarks

Contains the color of the brush to use when drawing markers.

Markers are used to indicate which objects have been selected in a vector handle.

See Also

Elements	MarkerPenStyle property, MarkerPenWidth property, MarkerPenColor property, MarkerBrushStyle property, MarkerBrushHatch property

Topics	Getting/Setting Vector Handle Information


MarkerBrushHatch property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long MarkerBrushHatch

Overview	Refer to Working with Vector Handles

Remarks

Contains the hatch of the brush to use when drawing markers.

Markers are used to indicate which objects have been selected in a vector handle.

For a list of possible values, refer to MarkerBrushHatchStyles.

See Also

Elements	MarkerBrushColor property, MarkerBrushStyle property, MarkerPenWidth property, MarkerPenColor property, MarkerPenStyle property

Topics	Getting/Setting Vector Handle Information


MarkerBrushStyle property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long MarkerBrushStyle

Overview	Refer to Working with Vector Handles

Remarks

Contains the style of the brush to use when drawing markers.

Markers are used to indicate which objects have been selected in a vector handle.

For a list of possible values, refer to MarkerBrushStyles.

See Also

Elements	MarkerPenWidth property, MarkerPenColor property, MarkerPenStyle property, MarkerBrushColor property, MarkerBrushHatch property

Topics	Getting/Setting Vector Handle Information


MarkerPenStyle property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long MarkerPenStyle

Overview	Refer to Working with Vector Handles

Remarks

Contains the style of the pen to use when drawing markers.

Markers are used to indicate which objects have been selected in a vector handle.

For a list of possible values, refer to MarkerPenStyles.

See Also

Elements	MarkerPenWidth property, MarkerPenColor property, MarkerBrushStyle property, MarkerBrushColor property, MarkerBrushHatch property

Topics	Getting/Setting Vector Handle Information


MarkerPenWidth property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long MarkerPenWidth

Overview	Refer to Working with Vector Handles

Remarks

Contains the width of the pen to use when drawing markers.

Width is measured in pixels.

Markers are used to indicate which objects have been selected in a vector handle.

See Also

Elements	MarkerPenStyle property, MarkerPenColor property, MarkerBrushStyle property, MarkerBrushColor property, MarkerBrushHatch property

Topics	Getting/Setting Vector Handle Information


MarkerPenColor property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	OLE_COLOR MarkerPenColor

Overview	Refer to Working with Vector Handles

Remarks

Contains the color of the pen to use when drawing markers.

Markers are used to indicate which objects have been selected in a vector handle.

See Also

Elements	MarkerPenStyle property, MarkerPenWidth property, MarkerBrushStyle property, MarkerBrushColor property, MarkerBrushHatch property

Topics	Getting/Setting Vector Handle Information


MouseDown event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void MouseDown (short Button, short Shift, double X, double Y);

Overview	Refer to Working with the Mouse and the Keyboard.

Remarks

Occurs when the user presses a mouse button.

See Also

Elements	Click event, DblClick event, MouseMove event, MouseUp event


Button Parameter For MouseDown
Button

An integer that identifies the button that was pressed to cause the event. The following are possible values:

Value	Meaning

1	left button

2	right button


Shift Parameter For MouseDown
Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is pressed. The following are possible values:

Value	Meaning

1	SHIFT key

2	CTRL key

4	ALT key

3	CTRL/SHIFT key

5	ALT/SHIFT key

6	CTRL/ALT key

7	CTRL/ALT/SHIFT key


X Parameter For MouseDown
X

The X coordinate of the mouse pointer relative to the origin of the Main Control. The unit of measure is determined by the form that contains the Main Control.


Y Parameter For MouseDown
Y

The Y coordinate of the mouse pointer relative to the origin of the Main Control. The unit of measure is determined by the form that contains the Main Control.


MouseIcon property (Vector Control)

Visual Basic example   Other systems

Syntax	IPictureDisp* MouseIcon

Overview	Refer to Working with the Mouse and the Keyboard.

Remarks

(Persistent property, available at design time) Sets a custom mouse icon.

You can set this property to a cursor or icon file. Then, you can set the MousePointer property to 99 to implement the custom mouse icon.

See Also

Elements	MousePointer property


MouseMove event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void MouseMove (short Button, short Shift, double X, double Y);

Overview	Refer to Working with the Mouse and the Keyboard.

Remarks

Occurs when the user moves the mouse over the Main Control.

See Also

Elements	Click event, DblClick event, MouseDown event, MouseUp event


Button Parameter For MouseMove
Button

An integer that identifies any buttons that were pressed when the user moved the mouse. The following are possible values:

Value	Meaning

1	left button

2	right button


Shift Parameter For MouseMove
Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is pressed. The following are possible values:

Value	Meaning

1	SHIFT key

2	CTRL key

4	ALT key

3	CTRL/SHIFT key

5	ALT/SHIFT key

6	CTRL/ALT key

7	CTRL/ALT/SHIFT key


X Parameter For MouseMove
X

The X coordinate of the mouse pointer relative to the origin of the Main Control. The unit of measure is determined by the form that contains the Main Control.


Y Parameter For MouseMove
Y

The Y coordinate of the mouse pointer relative to the origin of the Main Control. The unit of measure is determined by the form that contains the Main Control.


MousePointer property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short MousePointer

Overview	Refer to Working with the Mouse and the Keyboard.

Remarks

(Persistent property, available at design time) Sets or returns the value that indicates the type of mouse pointer for the Main Control.

Setting	Meaning

0	(Default) Shape determined by the object

1	Arrow

2	Cross-hair

3	I-Beam

4	Small square within a square

5	Four-pointed arrow pointing north, south, east, and west

6	Double arrow pointing northeast and southwest

7	Double arrow pointing north and south

8	Double arrow pointing northwest and southeast

9	Double arrow pointing west and east

10	Up Arrow

11	Hourglass (wait)

12	No Drop

13	Arrow and hourglass

14	Arrow and question mark

15	Size all

99	Custom icon specified by the MouseIcon property

See Also

Elements	MouseIcon property


MouseUp event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void MouseUp (short Button, short Shift, OLE_XPOS_PIXELS X, OLE_YPOS_PIXELS Y);

Overview	Refer to Working with the Mouse and the Keyboard.

Remarks

Occurs when the user releases a mouse button.

See Also

Elements	Click event, DblClick event, MouseDown event, MouseMove event


Button Parameter For MouseUp
Button

An integer that identifies the button that was released to cause the event. The following are possible values:

Value	Meaning

1	left button

2	right button


Shift Parameter For MouseUp
Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is released. The following are possible values:

Value	Meaning

1	SHIFT key

2	CTRL key

4	ALT key

3	CTRL/SHIFT key

5	ALT/SHIFT key

6	CTRL/ALT key

7	CTRL/ALT/SHIFT key


X Parameter For MouseUp
X

The X coordinate of the mouse pointer relative to the origin of the Main Control. The unit of measure is determined by the form that contains the Main Control.


Y Parameter For MouseUp
Y

The Y coordinate of the mouse pointer relative to the origin of the Main Control. The unit of measure is determined by the form that contains the Main Control.


NewGroupDlgName property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BSTR NewGroupDlgName

Overview	Refer to Vector Dialogs

Remarks

String that contains the name of the new group. The value present in this property when the ShowNewGroupDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowNewGroupDlg method, the value used to initialize the dialog will be the default value "New Group". When the ShowNewGroupDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	ShowNewGroupDlg method, ShowEditGroupDlg method, ShowEditAllGroupsDlg method, ILEADVectorGroup::Name property

Topics	Using Vector Dialogs
Working with Vector Groups


NewLayerDlgActiveLayer property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL NewLayerDlgActiveLayer

Overview	Refer to Vector Dialogs

Remarks

Contains a value that indicates whether or not to use the active layer. The value present in this property, when the ShowNewLayerDlg method is called, is used to initialize the dialog. If this property is not set prior to calling the ShowNewLayerDlg method, the value used to initialize the dialog will be the default value FALSE.  When the ShowNewLayerDlg method returns, this property is updated with the value entered through the dialog.

Possible values are:

Value	Meaning

TRUE	Use the active layer.

FALSE	Do not use the active layer.

See Also

Elements	ShowNewLayerDlg method, NewLayerDlgName property, NewLayerDlgVisible property, NewLayerDlgLocked property, NewLayerDlgUserTag property

Topics	Using Vector Dialogs


NewLayerDlgLocked property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL NewLayerDlgLocked

Overview	Refer to Vector Dialogs

Remarks

Value that indicates whether or not the layer is locked. The value present in this property when the ShowNewLayerDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowNewLayerDlg method, the value used to initialize the dialog will be the default value FALSE.  When the ShowNewLayerDlg method returns, this property is updated with the value entered through the dialog.

A layer cannot be edited if it is locked.

Possible values are:

Value	Meaning

TRUE	The layer is locked.

FALSE	The layer is not locked.

See Also

Elements	ShowNewLayerDlg method, NewLayerDlgName property, NewLayerDlgVisible property, NewLayerDlgUserTag property, NewLayerDlgActiveLayer property

Topics	Using Vector Dialogs


NewLayerDlgName property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BSTR NewLayerDlgName

Overview	Refer to Vector Dialogs

Remarks

String that contains the name of the new layer. The value present in this property when the ShowNewLayerDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowNewLayerDlg method, the value used to initialize the dialog will be the default value "New Layer". When the ShowNewLayerDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	ShowNewLayerDlg method, NewLayerDlgVisible property, NewLayerDlgLocked property, NewLayerDlgUserTag property, NewLayerDlgActiveLayer property

Topics	Using Vector Dialogs


NewLayerDlgUserTag property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long NewLayerDlgUserTag

Overview	Refer to Vector Dialogs

Remarks

Value that indicates a user-defined tag. The value present in this property when the ShowNewLayerDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowNewLayerDlg method, the value used to initialize the dialog will be the default value 0.  When the ShowNewLayerDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	ShowNewLayerDlg method, NewLayerDlgName property, NewLayerDlgVisible property, NewLayerDlgLocked property, NewLayerDlgActiveLayer property

Topics	Using Vector Dialogs


NewLayerDlgVisible property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL NewLayerDlgVisible

Overview	Refer to Vector Dialogs

Remarks

Value that indicates whether or not the layer is visible. The value present in this property when the ShowNewLayerDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowNewLayerDlg method, the value used to initialize the dialog will be the default value TRUE. When the ShowNewLayerDlg method returns, this property is updated with the value entered through the dialog.

Possible values are:

Value	Meaning

TRUE	The layer is visible.

FALSE	The layer is not visible.

See Also

Elements	ShowNewLayerDlg method, NewLayerDlgName property, NewLayerDlgLocked property, NewLayerDlgUserTag property, NewLayerDlgActiveLayer property

Topics	Using Vector Dialogs


ObjectParallelogramLeftTopX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectParallelogramLeftTopX

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the X coordinate of the origin of the object’s parallelogram.  This property is updated by calling the GetObjectsParallelogram method.

See Also

Elements	ObjectParallelogramLeftTopY property, ObjectParallelogramLeftTopZ property, ObjectParallelogramRightBottomX property, ObjectParallelogramRightBottomY property, ObjectParallelogramRightBottomZ property, GetObjectsParallelogram method


ObjectParallelogramLeftTopY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectParallelogramLeftTopY

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the Y coordinate of the origin of the object’s parallelogram.  This property is updated by calling the GetObjectsParallelogram method.

See Also

Elements	ObjectParallelogramLeftTopX property, ObjectParallelogramLeftTopZ property, ObjectParallelogramRightBottomX property, ObjectParallelogramRightBottomY property, ObjectParallelogramRightBottomZ property, GetObjectsParallelogram method


ObjectParallelogramLeftTopZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectParallelogramLeftTopZ

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the Z coordinate of the origin of the object’s parallelogram.  This property is updated by calling the GetObjectsParallelogram method.

See Also

Elements	ObjectParallelogramLeftTopX property, ObjectParallelogramLeftTopY property, ObjectParallelogramRightBottomX property, ObjectParallelogramRightBottomY property, ObjectParallelogramRightBottomZ property, GetObjectsParallelogram method


ObjectParallelogramRightBottomX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectParallelogramRightBottomX

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the X coordinate of the right bottom vertex of the object’s parallelogram.  This property is updated by calling the GetObjectsParallelogram method.

See Also

Elements	ObjectParallelogramLeftTopX property, ObjectParallelogramLeftTopY property, ObjectParallelogramLeftTopZ property, ObjectParallelogramRightBottomY property, ObjectParallelogramRightBottomZ property, GetObjectsParallelogram method


ObjectParallelogramRightBottomY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectParallelogramRightBottomY

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the Y coordinate of the right bottom vertex of the object’s parallelogram.  This property is updated by calling the GetObjectsParallelogram method.

See Also

Elements	ObjectParallelogramLeftTopX property, ObjectParallelogramLeftTopY property, ObjectParallelogramLeftTopZ property, ObjectParallelogramRightBottomX property, ObjectParallelogramRightBottomZ property, GetObjectsParallelogram method


ObjectParallelogramRightBottomZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectParallelogramRightBottomZ

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the Z coordinate of the right bottom vertex of the object’s parallelogram.  This property is updated by calling the GetObjectsParallelogram method.

See Also

Elements	ObjectParallelogramLeftTopX property, ObjectParallelogramLeftTopY property, ObjectParallelogramLeftTopZ property, ObjectParallelogramRightBottomX property, ObjectParallelogramRightBottomY property, GetObjectsParallelogram method


ObjectRectHeight property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectRectHeight

Overview	Refer to Working with Vector Objects

Remarks

(Read-Only) Gets the height of the object’s physical bounding rectangle.  This property is updated by calling the GetObjectsRect method.

See Also

Elements	ObjectRectLeft property, ObjectRectTop property, ObjectRectWidth property, GetObjectsRect method


ObjectRectLeft property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectRectLeft

Overview	Refer to Working with Vector Objects

Remarks

(Read-Only) Gets the X coordinate of the origin of the object’s physical bounding rectangle.  This property is updated by calling the GetObjectsRect method.

See Also

Elements	ObjectRectHeight property, ObjectRectTop property, ObjectRectWidth property, GetObjectsRect method


ObjectRectTop property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectRectTop

Overview	Refer to Working with Vector Objects

Remarks

(Read-Only) Gets the Y coordinate of the origin of the object’s physical bounding rectangle.  This property is updated by calling the GetObjectsRect method.

See Also

Elements	ObjectRectHeight property, ObjectRectLeft property, ObjectRectWidth property, GetObjectsRect method


ObjectRectWidth property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ObjectRectWidth

Overview	Refer to Working with Vector Objects

Remarks

(Read-Only) Gets the width of the object’s physical bounding rectangle.  This property is updated by calling the GetObjectsRect method.

See Also

Elements	ObjectRectHeight property, ObjectRectLeft property, ObjectRectTop property, GetObjectsRect method


OriginX property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	double OriginX

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the X coordinate of the new origin of a vector image.

After adding objects to a vector handle, the origin of the image might change. To insure that the drawing is centered around its origin and to update the OriginX, OriginY and OriginZ parameters with the new origin values, call the Reset method with nFlag set to VECTOR_RESET_ORIGIN.

Note: for OpenGL and DirectX, setting the origin has no effect.

See Also

Elements	OriginY property, OriginZ property, Reset method

Topics	Getting/Setting Vector Handle Information


OriginY property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	double OriginY

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the Y coordinate of the new origin of a vector image.

After adding objects to a vector handle, the origin of the image might change. To insure that the drawing is centered around its origin and to update the OriginX, OriginY and OriginZ parameters with the new origin values, call the Reset method with nFlag set to VECTOR_RESET_ORIGIN.

Note: for OpenGL and DirectX, setting the origin has no effect.

See Also

Elements	OriginX property, OriginZ property, Reset method

Topics	Getting/Setting Vector Handle Information


OriginZ property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	double OriginZ

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the Z coordinate of the new origin of a vector image.

After adding objects to a vector handle, the origin of the image might change. To insure that the drawing is centered around its origin and to update the OriginX, OriginY and OriginZ parameters with the new origin values, call the Reset method with nFlag set to VECTOR_RESET_ORIGIN.

Note: for OpenGL and DirectX, setting the origin has no effect.

See Also

Elements	OriginX property, OriginY property, Reset method

Topics	Getting/Setting Vector Handle Information


PanX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long PanX

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the panning offset in the X direction.

Use this to handle scrolling the vector when the AutoScroll property is set to False.

See Also

Elements	PanY property


PanY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long PanY

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the panning offset in the Y direction.

Use this to handle scrolling the vector when the AutoScroll property is set to False.

See Also

Elements	PanX property


ParallelogramMinX property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ParallelogramMinX

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the X coordinate of the minimum point of the parallelogram bounding the vector image loaded in the control.

After adding objects to a vector handle, the logical size of the image might change. To update the ParallelogramMinX, ParallelogramMinY, ParallelogramMinZ, ParallelogramMaxX, ParallelogramMaxY and ParallelogramMaxZ parameters with the new boundary values, call the Reset method with nFlag set to VECTOR_RESET_PARALLELOGRAM.

See Also

Elements	ParallelogramMinY property, ParallelogramMinZ property, ParallelogramMaxX property, ParallelogramMaxY property, ParallelogramMaxZ property, Reset method

Topics	Getting/Setting Vector Handle Information


ParallelogramMinY property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ParallelogramMinY

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the X coordinate of the minimum point of the parallelogram bounding the vector image loaded in the control.

After adding objects to a vector handle, the logical size of the image might change. To update the ParallelogramMinX, ParallelogramMinY, ParallelogramMinZ, ParallelogramMaxX, ParallelogramMaxY and ParallelogramMaxZ parameters with the new boundary values, call the Reset method with nFlag set to VECTOR_RESET_PARALLELOGRAM.

See Also

Elements	ParallelogramMinY property, ParallelogramMinZ property, ParallelogramMaxX property, ParallelogramMaxY property, ParallelogramMaxZ property, Reset method

Topics	Getting/Setting Vector Handle Information


ParallelogramMinZ property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ParallelogramMinZ

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the Z coordinate of the minimum point of the parallelogram bounding the vector image loaded in the control.

After adding objects to a vector handle, the logical size of the image might change. To update the ParallelogramMinX, ParallelogramMinY, ParallelogramMinZ, ParallelogramMaxX, ParallelogramMaxY and ParallelogramMaxZ parameters with the new boundary values, call the Reset method with nFlag set to VECTOR_RESET_PARALLELOGRAM.

See Also

Elements	ParallelogramMinX property, ParallelogramMinY property, ParallelogramMaxX property, ParallelogramMaxY property, ParallelogramMaxZ property, Reset method

Topics	Getting/Setting Vector Handle Information


ParallelogramMaxX property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ParallelogramMaxX

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the X coordinate of the maximum point of the parallelogram bounding the vector image loaded in the control.

After adding objects to a vector handle, the logical size of the image might change. To update the ParallelogramMinX, ParallelogramMinY, ParallelogramMinZ, ParallelogramMaxX, ParallelogramMaxY and ParallelogramMaxZ parameters with the new boundary values, call the Reset method with nFlag set to VECTOR_RESET_PARALLELOGRAM.

See Also

Elements	ParallelogramMaxY property, ParallelogramMaxZ property, ParallelogramMinX property, ParallelogramMinY property, ParallelogramMinZ property, Reset method

Topics	Getting/Setting Vector Handle Information


ParallelogramMaxY property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ParallelogramMaxY

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the Y coordinate of the maximum point of the parallelogram bounding the vector image loaded in the control.

After adding objects to a vector handle, the logical size of the image might change. To update the ParallelogramMinX, ParallelogramMinY, ParallelogramMinZ, ParallelogramMaxX, ParallelogramMaxY and ParallelogramMaxZ parameters with the new boundary values, call the Reset method with nFlag set to VECTOR_RESET_PARALLELOGRAM.

See Also

Elements	ParallelogramMaxX property, ParallelogramMaxZ property, ParallelogramMinX property, ParallelogramMinY property, ParallelogramMinZ property, Reset method

Topics	Getting/Setting Vector Handle Information


ParallelogramMaxZ property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ParallelogramMaxZ

Overview	Refer to Working with Vector Handles

Remarks

Gets or sets the Z coordinate of the maximum point of the parallelogram bounding the vector image loaded in the control.

After adding objects to a vector handle, the logical size of the image might change. To update the ParallelogramMinX, ParallelogramMinY, ParallelogramMinZ, ParallelogramMaxX, ParallelogramMaxY and ParallelogramMaxZ parameters with the new boundary values, call the Reset method with nFlag set to VECTOR_RESET_PARALLELOGRAM.

See Also

Elements	ParallelogramMaxX property, ParallelogramMaxY property, ParallelogramMinX property, ParallelogramMinY property, ParallelogramMinZ property, Reset method

Topics	Getting/Setting Vector Handle Information


Paste method (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	short Paste (long nFlags);

Overview	Refer to Using the Clipboard

Remarks

(Vector Imaging Pro Only) Copies vector data from the clipboard to the current vector handle.

This method will not remove the vector data from the clipboard.

To determine whether there is valid vector data on the clipboard, call the ClipboardReady method.

To copy vector data to the clipboard from the current vector handle, call the Copy method.

See Also

Elements	Copy method, ClipboardReady method

Topics	Using the Clipboard


nFlags Parameter For Paste
nFlags

Flag that indicates the objects to paste. Possible values are:

Value	Meaning
0	Copy all layers and objects from the current vector handle to the clipboard.
VECTOR_FLAGS_SELECTED_ONLY	Copy only selected objects from the current vector handle to the clipboard.
VECTOR_FLAGS_REPLACE	Empty the destination vector before copying.
VECTOR_FLAGS_RENAME_DUPLICATES	Renames duplicate layer names if found. This flag is only valid when VECTOR_FLAGS_REPLACE is not specified. The toolkit will add a suffix (0, 1, 2, etc) to the layer name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.
VECTOR_FLAGS_COPY_INTO_ACTIVE_LAYER	Copies objects and layers into the active layer of the destination vector.
VECTOR_FLAGS_COPY_LAYERS_ONLY	Copies all layers and objects from the source vector to the destination vector. Transformation, camera, viewport and all other properties of the destination vector will not be effected.


Return for Paste
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


PhysicalToLogical method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short PhysicalToLogical (double fPhyX, double fPhyY);

Overview	Refer to Working with Vector Objects

Remarks

Converts a given 2D physical point into a logical (with X, Y, Z coordinates), 3D point.

The LogicalX, LogicalY and LogicalZ properties are updated with the 3-dimensional point.

The Z value of the destination 3D point will not be changed.

Conversion will be based on the current view port and camera values.

Not supported in OpenGL or DirectX engines.

See Also

Elements	LogicalX property, LogicalY property, LogicalZ property

Topics	Modifying Object Characteristics


fPhyX Parameter For PhysicalToLogical
fPhyX

X coordinate of the 2-dimensional point to convert.


fPhyY Parameter For PhysicalToLogical
fPhyY

Y coordinate of the 2-dimensional point to convert.


Return for PhysicalToLogical
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


PhysicalX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double PhysicalX

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the X coordinate of the last physical point generated by the LogicalToPhysical method.

See Also

Elements	PhysicalY property, LogicalToPhysical method


PhysicalY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double PhysicalY

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the Y coordinate of the last physical point generated by the LogicalToPhysical method.

See Also

Elements	PhysicalX property, LogicalToPhysical method


PolygonMode property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short PolygonMode

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the polygon mode. Possible values are:

Value	Meaning

VECTOR_POLYGON_POINT	Draw only the edge points on polygons and lines.

VECTOR_POLYGON_LINE	Draw as wireframe.

VECTOR_POLYGON_FILL	Draw solid polygons.

VECTOR_POLYGON_FILL_RASTER_ALWAYS	Draw solid polygons and always draw raster objects.

See Also

Elements	Dlg3DOptionsPolygonMode, Show3DoptionsDlg method


PrintEnd method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short PrintEnd (long hDC);

Overview	Refer to Printing a Vector Image.

Remarks

Ejects the page and ends the print job.

Use the PrintStart method to begin a print job; use the Render method to print an image; then use the PrintEnd method to eject the page and end the print job.

See Also

Elements	Render method, PrintStart method

Topics	Vector Images: Printing Images


hDC Parameter For PrintEnd
hDC

The handle to the device context, which was returned by the PrintStart method.


Return for PrintEnd
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


PrintStart method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long PrintStart ();

Overview	Refer to Printing a Vector Image.

Remarks

Starts a print job on the default printer.

This method returns an hDC that you can use when calling the Render method to print an image.

To eject the page and end the print job, call the PrintEnd method.

See Also

Elements	Render method, PrintEnd method

Topics	Vector Images: Printing Images


Return for PrintStart
Return Value

The device handle (hDC) for the default printer.


Realize method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short Realize (long Bitmap,BOOL bEraseBkgnd);

Overview	Refer to Working with Vector Objects

Remarks

Draws the current vector into the specified LEAD bitmap.

The background color used to erase the rectangle where the vector image is to be rendered can be set in the BackColor property.

This method will use the current camera and current view port of the vector handle to do the necessary projection onto the surface of the DC.

Note: For the OpenGL engine, the background color will always be used to erase all of the image before drawing, regardless of the view port.

See Also

Elements	BackColor property


Bitmap Parameter For Realize
Bitmap

The handle to the bitmap into which the vector will be realized


bEraseBkgnd Parameter For Realize
bEraseBkgnd

Flag that indicates whether or not to erase the background rectangle when realizing the vector to the bitmap. Possible values are:

Value	Meaning

TRUE	The background rectangle will be erased when the vector image is realized to the bitmap.

FALSE	The background rectangle will not be erased.


Return for Realize
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Redo method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short Redo (long nFlags);

Overview	Refer to Undoing and Redoing Automation Operations

Remarks

Repeats that last automation operation performed in the active automation container.

This method can be called for each process "undone" in the active automation container by calling the Undo method. For example, if the Undo method has been called three times, to undo three processes, then calling the Redo method can redo those three processes. The first call to the Redo method will redo the first process; the second call will redo the second process and the third call will redo the third process.

See Also

Elements	CanRedo method, CanUndo method, UndoLevel property, Undo method, AddUndoNode method, EnableUndo method

Topics:	Vector Automation: Undoing/Redoing Operations


nFlags Parameter For Redo
nFlags

Reserved for future use. Use 0.


Returns For Redo
Return Value

Return	Meaning

0	The method was successful.

<> 0 	An error occurred. Refer to Error Codes.


RenderDlgAmbientColor property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	OLE_COLOR RenderDlgAmbientColor

Overview	Refer to Vector Dialogs

Remarks

Contains an ambient color. The value present in this property when the ShowRenderDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowRenderDlg method, the value used to initialize the dialog will come from the AmbientColor property of the vector handle. When the ShowRenderDlg method returns, this property is updated with the value entered through the dialog.

If the GDI engine is being used, the RenderDlgUseLights and RenderDlgAmbientColor properties are not used.

See Also

Elements	RenderDlgUseLights property, RenderDlgPolygonMode property, ShowRenderDlg method, AmbientColor property

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


RenderDlgPolygonMode property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short RenderDlgPolygonMode

Overview	Refer to Vector Dialogs

Remarks

Contains an ambient color. The value present in this property when the ShowRenderDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowRenderDlg method, the value used to initialize the dialog will come from the PolygonMode property of the vector handle. When the ShowRenderDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	RenderDlgUseLights property, RenderDlgAmbientColor property, ShowRenderDlg method, PolygonMode property

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


RenderDlgUseLights property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL RenderDlgUseLights

Overview	Refer to Vector Dialogs

Remarks

Contains a value that indicates whether or not to use lights when rendering the image. The value present in this property when the ShowRenderDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowRenderDlg method, the value used to initialize the dialog will come from the UseLights property of the vector handle. When the ShowRenderDlg method returns, this property is updated with the value entered through the dialog.

If the GDI engine is being used, the RenderDlgUseLights and RenderDlgAmbientColor properties are not used.

See Also

Elements	RenderDlgAmbientColor property, RenderDlgPolygonMode property, UseLights property

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


RenderTextAsCurves property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL RenderTextAsCurves

Overview	Refer to Overview

Remarks

Specifies whether to render the text within the vector toolkit.  Possible values are:

Setting	Descrition

TRUE	Render the text object as shapes (lines and curves).

FALSE	Render the text object as one unit.  This is the default.

Setting this property to TRUE, forces the toolkit to override the default handling and to render the text object as shapes.

See Also

Elements	ClipMode property, AntiAliasingThreshold property, AntiAliasingDim property, AntiAliasingFilter property

Topics	Vector Images: Display Settings


Render method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short Render (long hDC, long nLeft, long nTop, long nWidth, long nHeight);

Overview	Refer to Printing a Vector Image.

Remarks

Prints a vector image or displays the vector image in any device context.

You must specify the device context, and the position and dimensions of the printed image. The measurements use the scale mode of the device context.

See Also

Elements	PrintEnd method, PrintStart method

Topics	Vector Images: Printing Images


hDC Parameter For Render
hDC

Handle to the device context (DC) where the vector is to print. The mapping mode of the device context must be MM_TEXT.


nLeft Parameter For Render
nLeft

X position to start the print. The value is in dots, and the actual position depends on the dots per inch (DPI) of the printer.


nTop Parameter For Render
nTop

Y position to start the print. The value is in dots, and the actual position depends on the dots per inch (DPI) of the printer.


nWidth Parameter For Render
nWidth

The width of the image to print. The value is in dots, and the actual width depends on the dots per inch (DPI) of the printer.


nHeight Parameter For Render
nHeight

The height of the image to print. The value is in dots, and the actual height depends on the dots per inch (DPI) of the printer.


Return for Render
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Reset method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void Reset (long nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Resets the vector to the default display settings.

See Also

Elements	ForceRepaint method


nFlag Parameter For Reset
nFlag

Flag that indicates what to reset. Possible values are:

Value	Meaning

VECTOR_RESET_ROTATE	[0x00000001]

VECTOR_RESET_SCALE	[0x00000002]

VECTOR_RESET_TRANSLATE	[0x00000004]

VECTOR_RESET_CAMERA	[0x00000008]

VECTOR_RESET_PARALLELOGRAM	[0x00000010]

VECTOR_RESET_ORIGIN	[0x00000020]

VECTOR_RESET_PAN	[0x00000040]

VECTOR_RESET_ALL	[0x0000007F]


Return for Reset
Return Value

None.


Resize event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void Resize ();

Overview	Refer to Viewing a Vector Image

Remarks

Occurs when the Vector Control first appears and whenever the size of the control changes.


RotationDlgOriginX property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long RotationDlgOriginX

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Rotation dialog that represents the X coordinate of the origin of rotation for the loaded vector image.

The value present in this property when the ShowRotateDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowRotateDlg method, the dialog will be initialized with the default value 0.0. When the ShowRotateDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	RotationDlgOriginY property, RotationDlgOriginZ property, ShowRotateDlg method

Topics	Modifying Object Characteristics
Using Vector Dialogs


RotationDlgOriginY property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long RotationDlgOriginY

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Rotation dialog that represents the Y coordinate of the origin of rotation for the loaded vector image.

The value present in this property when the ShowRotateDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowRotateDlg method, the dialog will be initialized with the default value 0.0. When the ShowRotateDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	RotationDlgOriginX property, RotationDlgOriginZ property, ShowRotateDlg method

Topics	Modifying Object Characteristics
Using Vector Dialogs


RotationDlgOriginZ property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long RotationDlgOriginZ

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Rotation dialog that represents the Z coordinate of the origin of rotation for the loaded vector image.

The value present in this property when the ShowRotateDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowRotateDlg method, the dialog will be initialized with the default value 0.0. When the ShowRotateDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	RotationDlgOriginX property, RotationDlgOriginY property, ShowRotateDlg method

Topics	Modifying Object Characteristics
Using Vector Dialogs


RotationDlgX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double RotationDlgX

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the X scale value for the VectorRotate dialog box.

See Also

Elements	RotationDlgY property, RotationDlgZ property, ShowRotateDlg method


RotationDlgY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double RotationDlgY

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the Y scale value for the VectorRotate dialog box.

See Also

Elements	RotationDlgX property, RotationDlgZ property, ShowRotateDlg method


RotationDlgZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double RotationDlgZ

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the Z scale value for the VectorRotate dialog box.

See Also

Elements	RotationDlgX property, RotationDlgY property, ShowRotateDlg method


RotationX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double RotationX

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the rotation value for the X axis. This property is set when you call the SetRotation method.

See Also

Elements	RotationY property, RotationZ property, SetRotation method


RotationY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double RotationY

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the rotation value for the Y axis. This property is set when you call the SetRotation method.

See Also

Elements	RotationX property, RotationZ property, SetRotation method


RotationZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double RotationZ

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the rotation value for the Z axis. This property is set when you call the SetRotation method.

See Also

Elements	RotationX property, RotationY property, SetRotation method


Save method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short Save (BSTR pszName, short nFormat);

Overview	Refer to Loading and Saving Vectors

Remarks

Saves the vector to a file in any of the supported compressed or uncompressed vector formats.

You should call ApplyTransformation to make the changes part of the vector image, if you don’t your changes will not be saved.

See Also

Elements	SaveMemory method, SaveArray method, Load method, LoadArray method, LoadMemory method, ApplyTransformation method


pszName Parameter For Save
pszName

Character string containing the output file name.


nFormat Parameter For Save
nFormat

Output file format. For valid values, refer to Formats of Output Files.


Return for Save
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


SaveArray method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT* SaveArray (short nFormat);

Overview	Refer to Loading and Saving Vectors

Remarks

Saves a vector image to a file in a byte array in memory. The output can be in any of the supported compressed or uncompressed file formats.

To see the correct data types, refer to the code example for your development system.

To load an image from a file in memory, refer to the LoadArray method.

You can calculate the size using the following:

Size = UBound(variant) – LBound(variant) + 1

See Also

Elements	LoadArray method, LoadMemory method, Save method


nFormat Parameter For SaveArray
nFormat

Output file format. For valid values, refer to Formats of Output Files.


Return for SaveArray
Return Value

VARIANT byte array that contains the vector image data


SaveMemory method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short SaveMemory (long* phMem, short nFormat, long* plSize);

Overview	Refer to Loading and Saving Vectors

Remarks

Saves a vector image to a file in memory. The output can be in any of the supported compressed or uncompressed vector file formats.

To use this method, do the following:

1.	Declare a variable of the appropriate data type to reference the file in memory. You can then pass its address (pass the variable by reference) in this method, which will allocate the memory, save the bitmap, and unlock the memory.

2.	Declare a long integer variable for the file-size. You can then pass its address in this method, which will update its value with the size of the file.

3.	Call this method to save the vector image in the specified memory handle.

To see the correct data types, refer to the code example for your development system.

To load an image from a file in memory, refer to the LoadMemory method.

See Also

Elements	Save method, SaveArray method


phMem Parameter For SaveMemory
phMem

Address of the long variable that you use to reference the file in memory. In C++, you declare the variable and pass its address. In most other languages, you pass the variable by reference. The method updates the value of the variable. The variable must be a long integer.


nFormat Parameter For SaveMemory
nFormat

Output file format. For valid values, refer to Formats of Output Files.


plSize Parameter For SaveMemory
plSize

Address of the long integer variable that you use to track the size of the file in memory. In C++, you declare the variable and pass its address. In most other languages, you pass the variable by reference. The method updates the value of the variable. The variable must be declared with the appropriate data type. To see the correct data type, refer to the code example for your development system.


Return for SaveMemory
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ScaleDlgOriginX property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ScaleDlgOriginX

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Scale dialog that represents the X coordinate of the origin of scale for the loaded vector image.

The value present in this property when the ShowScaleDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowScaleDlg method, the dialog will be initialized with the default value 0.0. When the ShowScaleDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	ScaleDlgOriginY property, ScaleDlgOriginZ property, ShowScaleDlg method

Topics	Modifying Object Characteristics
Using Vector Dialogs


ScaleDlgOriginY property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ScaleDlgOriginY

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Scale dialog that represents the Y coordinate of the origin of scale for the loaded vector image.

The value present in this property when the ShowScaleDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowScaleDlg method, the dialog will be initialized with the default value 0.0. When the ShowScaleDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	ScaleDlgOriginX property, ScaleDlgOriginZ property, ShowScaleDlg method

Topics	Modifying Object Characteristics
Using Vector Dialogs


ScaleDlgOriginZ property (Vector Control)

Visual Basic Example   Visual C++ 4.0 Example

Syntax	long ScaleDlgOriginZ

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the value in the Scale dialog that represents the Z coordinate of the origin of scale for the loaded vector image.

The value present in this property when the ShowScaleDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowScaleDlg method, the dialog will be initialized with the default value 0.0. When the ShowScaleDlg method returns, this property is updated with the value entered through the dialog.

See Also

Elements	ScaleDlgOriginX property, ScaleDlgOriginY property, ShowScaleDlg method

Topics	Modifying Object Characteristics
Using Vector Dialogs


ScaleDlgX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ScaleDlgX

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the X scale value for the VectorScale dialog box.

See Also

Elements	ScaleDlgY property, ScaleDlgZ property, ShowScaleDlg method


ScaleDlgY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ScaleDlgY

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the Y scale value for the VectorScale dialog box.

See Also

Elements	ScaleDlgX property, ScaleDlgZ property, ShowScaleDlg method


ScaleDlgZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ScaleDlgZ

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the Z scale value for the VectorScale dialog box.

See Also

Elements	ScaleDlgX property, ScaleDlgY property, ShowScaleDlg method


ScaleHeight property (Vector Control)

This property has been removed.


ScaleLeft property (Vector Control)

This property has been removed.


ScaleMode property (Vector Control)

This property has been removed.


ScaleTop property (Vector Control)

This property has been removed.


ScaleWidth property (Vector Control)

This property has been removed.


ScalingX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ScalingX

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the scaling value for the X axis. This property is set when you call the SetScaling method.

See Also

Elements	ScalingY property, ScalingZ property, SetScaling method


ScalingY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ScalingY

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the scaling value for the Y axis. This property is set when you call the SetScaling method.

See Also

Elements	ScalingX property, ScalingZ property, SetScaling method


ScalingZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ScalingZ

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the scaling value for the Z axis. This property is set when you call the SetScaling method.

See Also

Elements	ScalingX property, ScalingY property, SetScaling method


SelectAllObjects method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void SelectAllObjects (VARIANT_BOOL bSelected);

Overview	Refer to Working with Vector Objects

Remarks

(Vector Imaging Pro Only) Selects or de-selects all items in the vector.

This method will generate a runtime exception, if the EnableMethodErrors property has been set to TRUE. To properly trap runtime exceptions, you can do the following:

On Error Goto MYERRORHANDLER 'start exception handling
LEADVector1.EnableMethodErrors = True ' turn on LEAD exceptions
LEADVector1.SelectAllObjects(…) ' call a method
LEADVector1.XXXXX(…) ' call another method
On Error Goto 0 ' stop exception handling

Exit Sub

MYERRORHANDLER:
   MsgBox "Error: " & CStr(Err.Number)
'……..

See Also

Elements	IsAnObjectSelected method


bSelected Parameter For SelectAllObjects
bSelected

Flag that indicates whether to select or de-select all objects. Possible values are:

Value	Meaning

TRUE	Select all objects.

FALSE	De-select all objects.


Return for SelectAllObjects
Return Value

None


SetDlgString method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short SetDlgString (long nString, BSTR pszString);

Overview	Refer to Vector Dialogs

Remarks

Sets the current string at the specified index. For a list if strings and their corresponding indices, refer to Dialog Strings

To retrieve the string at a specific index you can use the GetDlgString method.

See Also

Elements	GetDlgString method

Using Vector Dialogs


nString Parameter For SetDlgString
nString

Index of the string to set.


pszString Parameter For SetDlgString
pszString

The string to set at the specified index.


Return for SetDlgString
Return Value

Return	Meaning

>0	The current string at the specified index.

0	An error occurred.


SetRotation method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short SetRotation (double fAngleX, double fAngleY, double fAngleZ, double fOriginX, double fOriginY, double fOriginZ, VARIANT_BOOL bUseOrigin, short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Rotates all or part of the vector image along the specified axes.

This method updates the RotationX, RotationY, and RotationZ properties.

Note: When you rotate a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind-vertices mode set in the VertexBindMode property.

Note: For DirectX: only VECTOR_ALL_OBJECTS is allowed for nFlag.

You should call ApplyTransformation to make the changes part of the vector image, if you don’t your changes will not be saved.

See Also

Elements	RotationX property, RotationY property, RotationZ property, VertexBindMode property, ShowRotateDlg method, ApplyTransformation method


fAngleX Parameter For SetRotation
fAngleX

Rotation value for the X axis.

The translation value is in logical units.


fAngleY Parameter For SetRotation
fAngleY

Rotation value for the Y axis.

The translation value is in logical units.


fAngleZ Parameter For SetRotation
fAngleZ

Rotation value for the Z axis.

The translation value is in logical units.


fOriginX Parameter For SetRotation
fOriginX

X coordinate of the center of rotation.


fOriginY Parameter For SetRotation
fOriginY

Y coordinate of the center of rotation.


fOriginZ Parameter For SetRotation
fOriginZ

Z coordinate of the center of rotation.


bUseOrigin Parameter For SetRotation
bUseOrigin

Flag that indicates whether or not to use the specified origin as the center of rotation, when rotating the object(s). Possible values are:

Value	Meaning

TRUE	Use the specified origin as the center of rotation

FALSE	Use the accumulative center of the objects as the center of rotation.


nFlag Parameter For SetRotation
nFlag

Flag that indicates which objects to rotate. Possible values are:

Value	Meaning

VECTOR_ALL_OBJECTS	rotates all objects from the vector

VECTOR_SELECTED_OBJECTS	rotates all selected objects from the vector

VECTOR_CURRENT_OBJECT	rotates the current object from the vector.


Return for SetRotation
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


SetScaling method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short SetScaling (double fScaleX, double fScaleY, double fScaleZ, double fOriginX, double fOriginY, double fOriginZ, VARIANT_BOOL bUseOrigin, short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Scales all or part of the vector image along the specified axes.

This method updates the ScalingX, ScalingY, and ScalingZ properties.

Note: A scale value of 1.0 represents a scale factor of 100%; a scale value of 0.5 represents a scale factor of 50%; a scale value of 2.0 represents a scale factor of 200%, etc.

Note: When you scale a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind-vertices mode set in the VertexBindMode property.

Note: For DirectX: only VECTOR_ALL_OBJECTS is allowed for nFlag.

You should call ApplyTransformation to make the changes part of the vector image, if you don’t your changes will not be saved.

See Also

Elements	ScalingX property, ScalingY property, ScalingZ property, VertexBindMode property, ShowScaleDlg method, ApplyTransformation method


fScaleX Parameter For SetScaling
fScaleX

Scaling value for the X axis.


fScaleY Parameter For SetScaling
fScaleY

Scaling value for the Y axis.


fScaleZ Parameter For SetScaling
fScaleZ

Scaling value for the Z axis.


fOriginX Parameter For SetScaling
fOriginX

X coordinate of the center of scaling.


fOriginY Parameter For SetScaling
fOriginY

Y coordinate of the center of scaling.


fOriginZ Parameter For SetScaling
fOriginZ

Z coordinate of the center of scaling.


bUseOrigin Parameter For SetScaling
bUseOrigin

Flag that indicates whether or not to use the specified origin as the center of scaling, when scaling the object(s). Possible values are:

Value	Meaning

TRUE	Use the specified origin as the center of scaling

FALSE	Use the accumulative center of the objects as the center of scaling.


nFlag Parameter For SetScaling
nFlag

Flag that indicates which objects to scale. Possible values are:

Value	Meaning

VECTOR_ALL_OBJECTS	scales all objects from the vector

VECTOR_SELECTED_OBJECTS	scales all selected objects from the vector

VECTOR_CURRENT_OBJECT	scales the current object from the vector.


Return for SetScaling
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


SetTranslation method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short SetTranslation (double fTranslationX, double fTranslationY, double fTranslationZ, short nFlag);

Overview	Refer to Working with Vector Objects

Remarks

Translates all or part of the vector image along the specified axes.

This method updates the TranslationX, TranslationY, and TranslationZ properties.

Note: When you translate a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind-vertices mode set in the VertexBindMode property.

Note: For DirectX:, only VECTOR_ALL_OBJECTS is allowed for nFlag.

You should call ApplyTransformation to make the changes part of the vector image, if you don’t your changes will not be saved.

See Also

Elements	TranslationX property, TranslationY property, TranslationZ property, VertexBindMode property, ShowTranslateDlg method, ApplyTransformation method


fTranslationX Parameter For SetTranslation
fTranslationX

Translation value for the X axis.

The translation value is in logical units.


fTranslationY Parameter For SetTranslation
fTranslationY

Translation value for the Y axis.

The translation value is in logical units.


fTranslationZ Parameter For SetTranslation
fTranslationZ

Translation value for the Z axis.

The translation value is in logical units.


nFlag Parameter For SetTranslation
nFlag

Flag that indicates which objects to translate. Possible values are:

Value	Meaning

VECTOR_ALL_OBJECTS	translates all objects from the vector

VECTOR_SELECTED_OBJECTS	translates all selected objects from the vector

VECTOR_CURRENT_OBJECT	translates the current object from the vector.


Return for SetTranslation
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Show3DOptionsDlg method (Vector Control)

This property has been removed. Refer to the following:

ShowRenderDlg method

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property


uFlags Parameter For Show3DOptionsDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for Show3DOptionsDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowCameraDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowCameraDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector Camera dialog.

Object selection has no effect on the camera.

This method updates the following properties:

CameraDlgPhi

CameraDlgTheta

CameraDlgLookAtX

CameraDlgLookAtY

CameraDlgLookAtZ

CameraDlgDistance

CameraDlgUsePerspective

See Also

Elements	CameraDlgPhi property, CameraDlgTheta property, CameraDlgZoom property


uFlags Parameter For ShowCameraDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowCameraDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowEditAllGroupsDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowEditAllGroupsDlg (long uFlags);

Overview	Refer to Working with Vector Groups

Remarks

(Vector Imaging Pro Only) Brings up the Vector Edit Groups dialog.

See Also

Elements	ShowNewGroupDlg method, ShowEditGroupDlg method

Topics	Using Vector Dialogs
Working with Vector Groups


uFlags Parameter For ShowEditAllGroupsDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowEditAllGroupsDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowEditAllLayersDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowEditAllLayersDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

(Vector Imaging Pro Only) Brings up the Vector Edit Layers dialog.

See Also

Topics	Using Vector Dialogs


uFlags Parameter For ShowEditAllLayersDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowEditAllLayersDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowEditGroupDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowEditGroupDlg (long nGroupIndex);

Overview	Refer to Vector Dialogs

Remarks

(Vector Imaging Pro Only) Brings up the Vector Edit Group dialog.

The value used to initialize the dialog will be the default value FALSE. When this method returns, this property is updated with the value entered through the dialog.

See Also

Elements	ShowNewGroupDlg method, ShowEditAllGroupsDlg method

Topics	Using Vector Dialogs
Working with Vector Groups


nGroupIndex Parameter For ShowEditGroupDlg
nGroupIndex

Index of the group to edit.


Return for ShowEditGroupDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowEditLayerDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowEditLayerDlg (long nLayerIndex);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector Edit Layer dialog.

The value present in the EditLayerDlgActiveLayer property when this method is called is used to initialize the dialog. If the EditLayerDlgActiveLayer property is not set prior to calling this method, the value used to initialize the dialog will be the default value FALSE. When this method returns, this property is updated with the value entered through the dialog.

This method updates the following property:

EditLayerDlgActiveLayer property

See Also

Elements	EditLayerDlgActiveLayer property

Topics	Using Vector Dialogs


nLayerIndex Parameter For ShowEditLayerDlg
nLayerIndex

Index of the layer to edit.


Return for ShowEditLayerDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowEditObjectDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowEditObjectDlg (long hObject);

Overview	Refer to Vector Dialogs

Remarks

(Vector Imaging Pro Only) Brings up the Edit Object dialog.

See Also

Elements	ShowNewObjectDlg method

Topics	Using Vector Dialogs


hObject Parameter For ShowEditObjectDlg
hObject

Handle to the object to edit.


Return for ShowEditObjectDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowHitTestDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowHitTestDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector Hit Test Options dialog.

The values present in the HitTestDlgFlags property and the HitTestDlgDistance property when the method is called are used to initialize the dialog. If the HitTestDlgFlags property and HitTestDlgDistance property are not set prior to calling this method , the values used to initialize the dialog will come from the HitTestFlags property and the HitTestDistance property of the vector handle. When this method returns, these properties are updated with the values entered through the dialog.

See Also

Elements	HitTestDlgDistance property, HitTestDlgFlags.property, HitTestFlags property, HitTestDistance property

Topics	Using Vector Dialogs


uFlags Parameter For ShowHitTestDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowHitTestDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowNewGroupDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowNewGroupDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

(Vector Imaging Pro Only) Brings up the Vector New Group dialog.

The value present in the NewGroupDlgName property when this method is called is used to initialize the dialog. If the property listed above is not set prior to calling this method, the value used to initialize the dialog will come from a default value. (For information on the default value, refer to the property listed above.) When this method returns, this property is updated with the value entered through the dialog.

This method updates the following property:

NewGroupDlgName property

See Also

Elements	NewGroupDlgName property, ShowNewGroupDlg method, ShowEditAllGroupsDlg method

Topics	Using Vector Dialogs
Working with Vector Groups


uFlags Parameter For ShowNewGroupDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowNewGroupDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowNewLayerDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowNewLayerDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

(Vector Imaging Pro Only) Brings up the Vector New Layer dialog.

The values present in the NewLayerDlgName, NewLayerDlgVisible, NewLayerDlgLocked, NewLayerDlgUserTag and NewLayerDlgActiveLayer properties when this method is called are used to initialize the dialog. If the properties listed above are not set prior to calling this method, the values used to initialize the dialog will come from default values. (For information on the default values, refer to the properties.) When this method returns, these properties are updated with the values entered through the dialog.

This method updates the following properties:

NewLayerDlgName property

NewLayerDlgVisible property

NewLayerDlgLocked property

NewLayerDlgUserTag property

NewLayerDlgActiveLayer property

See Also

Elements	NewLayerDlgName property, NewLayerDlgVisible property, NewLayerDlgLocked property, NewLayerDlgUserTag property, NewLayerDlgActiveLayer property

Topics	Using Vector Dialogs


uFlags Parameter For ShowNewLayerDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowNewLayerDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowNewObjectDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowNewObjectDlg (VectorObjectType ObjectType, long nLayerIndex);

Overview	Refer to Vector Dialogs

Remarks

(Vector Imaging Pro Only) Brings up the New Object dialog.

See Also

Elements	ShowEditObjectDlg method

Topics	Using Vector Dialogs


ObjectType Parameter For ShowNewObjectDlg
ObjectType

ObjectType: The type of objects to create. Possible values are:

Value	Meaning

VECTOR_OBJECT	[0]

VECTOR_VERTEX	[1] 3D vertex in space.

VECTOR_LINE	[2] Line.

VECTOR_RECTANGLE	[3] Rectangle.

VECTOR_POLYLINE	[4] Polyline.

VECTOR_POLYBEZIER	[5] Poly Bezier curve

VECTOR_POLYGON	[6] Multi-sided polygon.

VECTOR_ELLIPSE	[7] Ellipse.

VECTOR_CIRCLE	[8] Circle.

VECTOR_ARC	[9] Arc.

VECTOR_ELLIPTICALARC	[10] Elliptical arc

VECTOR_TEXT	[11] Text.

VECTOR_PIE	[12] Pie.

VECTOR_CHORD	[13] Chord.

VECTOR_POLYDRAW	[14] Polydraw.

VECTOR_RASTER	[15] Raster.

VECTOR_STOCK	[16] Stock object from a library.


nLayerIndex Parameter For ShowNewObjectDlg
nLayerIndex

Index of the layer in which to create the object.


Return for ShowNewObjectDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowRenderDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowRenderDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector Render Options dialog.

This dialog lets you change the current light use, the ambient color, and the polygon draw mode. Updating the variables is not affected by whether or not an object is selected.

The value present in the RenderDlgUseLights, RenderDlgAmbientColor, and RenderDlgPolygonMode properties when this method are called is used to initialize the dialog. If the properties listed above are not set prior to calling this method , the values used to initialize the dialog will come from the UseLights, AmbientColor and PolygonMode properties of the vector handle. When this method returns, this properties are updated with the value entered through the dialog.

If the GDI engine is being used, the RenderDlgUseLights and RenderDlgAmbientColor properties are not used.

This method updates the following properties:

RenderDlgUseLights property

RenderDlgAmbientColor property

RenderDlgPolygonMode property

See Also

Elements	RenderDlgUseLights property, RenderDlgAmbientColor property, RenderDlgPolygonMode property, UseLights property, AmbientColor property, PolygonMode property

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


uFlags Parameter For ShowRenderDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowRenderDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowRotateDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowRotateDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector Rotation dialog.

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be rotated in the dialog.

If there are selected objects inside the source vector handle, only those objects will be rotated in the dialog.

This method updates the following properties:

RotationDlgX

RotationDlgY

RotationDlgZ

RotationOriginDlgX

RotationOriginDlgY

RotationOriginDlgZ

See Also

Elements	RotationDlgX property, RotationDlgY property, RotationDlgZ property, RotationDlgOriginX property, RotationDlgOriginY property, RotationDlgOriginZ property


uFlags Parameter For ShowRotateDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowRotateDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowScaleDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowScaleDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector Scale dialog.

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be scaled in the dialog.

If there are selected objects inside the source vector handle, only those objects will be scaled in the dialog.

This method updates the following properties:

ScaleDlgX

ScaleDlgY

ScaleDlgZ

ScaleDlgOriginX

ScaleDlgOriginY

ScaleDlgOriginZ

See Also

Elements	ScaleDlgX property, ScaleDlgY property, ScaleDlgZ property, ScaleDlgOriginX property, ScaleDlgOriginY property, ScaleDlgOriginZ property


uFlags Parameter For ShowScaleDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowScaleDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowTranslateDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowTranslateDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector Translation dialog.

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be translated in the dialog.

If there are selected objects inside the source vector handle, only those objects will be translated in the dialog.

This method updates the following properties:

TranslateDlgX

TranslateDlgY

TranslateDlgZ

See Also

Elements	TranslateDlgX property, TranslateDlgY property, TranslateDlgZ property,


uFlags Parameter For ShowTranslateDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowTranslateDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ShowViewModeDlg method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ShowViewModeDlg (long uFlags);

Overview	Refer to Vector Dialogs

Remarks

Brings up the Vector View Mode dialog.

The value present in the ViewModeDlgViewMode property when this method is called is used to initialize the dialog. If the ViewModeDlgViewMode property is not set prior to calling this method , the value used to initialize the dialog will come from the ViewMode property of the vector handle. When this method returns, this property is updated with the value entered through the dialog. For a list of valid view mode values, refer to the ViewModeDlgViewMode property.

This method updates the following properties:

ViewModeDlgViewMode property

See Also

Elements	ViewModeDlgViewMode property, ViewMode property

Topics	Modifying Viewing Characteristics
Using Vector Dialogs


uFlags Parameter For ShowViewModeDlg
uFlags

User interface flags for dialog. Determines the layout and action of the dialog.

Value	Meaning

VECTOR_DLG_AUTOPROCESS	[0x80000000] process the image on OK.

VECTOR_DLG_SHOWPREVIEW	[0x40000000] show preview of image in dialog.


Return for ShowViewModeDlg
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


StartFeedLoad method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short StartFeedLoad (void);

Overview	Refer to Loading and Saving Vectors

Remarks

Initializes a file-load process in which you control the input stream. You must call the FeedLoad method to supply buffered data, and you must call StopFeedLoad method when the loading is complete.

This file-load process is useful when receiving transmitted vector images, such as those on the Internet. It works the same way as the Load method , except that your code supplies the image data. The file-load process works as follows:

1.	You call the StartFeedLoad method to initialize the file-load process.

2.	You create a buffer, and each time you fill it with information, you call the FeedLoad method, which sends the data to the file-load process just as if the data were being read from a file on disk.

3.	Whenever it has enough data to do so, the file-load process behaves the same as in the Load method. It allocates and begins loading the vector.

The file-load process does not update information in the LEAD Control until the StopFeedLoad method is called.

4.	To end the file-load process, you call the StopFeedLoad method, which cleans up the process. If you call this method before supplying the complete file, it will successfully clean up the process, but will return a file-read error. You should trap the error if the load is canceled purposely.

Support for vector images is available only in those products that include the Vector features. For a list of those products, refer to LEADTOOLS Products.

See Also

Elements	Load method, LoadMemory method, StartFeedLoad method, FeedLoad method


Return for StartFeedLoad
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


StopEnum property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL StopEnum

Overview	Refer to Working with Vector Objects

Remarks

(Run-time only) Stops the enumeration of objects or vertices. Set this to True inside the VectorVertices or VectorObjects events to stop the enumeration process.

See Also

Elements	VectorVertices, VectorObjects


StopFeedLoad method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short StopFeedLoad ();

Overview	Refer to Loading and Saving Vectors

Remarks

Ends a file-load process in which you control the input stream. This cleans up all the variables and buffers allocated by the StartFeedLoad method and the FeedLoad method, and resets all internal variables to their default settings.

You must call this method to complete a file load that was started with the StartFeedLoad method. If you call this method before supplying the complete file, it will successfully clean up the process, but will return a file-read error. You should trap the error if the load is canceled purposely.

For a description of how the methods relate to each other, refer to the StartFeedLoad method.

See Also

Elements	StartFeedLoad method, FeedLoad method


Return for StopFeedLoad
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ToolbarControl property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	LPDISPATCH ToolbarControl

Overview	Refer to The Automation Toolbar

Remarks

Gets or sets the associated LEADTOOLS Toolbar Control.

For more information about the LEADTOOLS Toolbar Control, refer to the Lttbdlln.hlp help file in the LEAD\Help directory.

See Also

Topics:	Vector Automation: Toolbar


TranslateDlgX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double TranslateDlgX

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the X translation value for the VectorTranslate dialog box.

See Also

Elements	TranslateDlgY property, TranslateDlgZ property, ShowTranslateDlg method


TranslateDlgY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double TranslateDlgY

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the Y translation value for the VectorTranslate dialog box.

See Also

Elements	TranslateDlgX property, TranslateDlgZ property, ShowTranslateDlg method


TranslateDlgZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double TranslateDlgZ

Overview	Refer to Vector Dialogs

Remarks

Gets or sets the Z translation value for the VectorTranslate dialog box.

See Also

Elements	TranslateDlgX property, TranslateDlgY property, ShowTranslateDlg method


TranslationX property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double TranslationX

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the translation value for the X axis. This property is set when you call the SetTranslation method.

See Also

Elements	TranslationY property, TranslationZ property, SetTranslation method


TranslationY property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double TranslationY

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the translation value for the Y axis. This property is set when you call the SetTranslation method.

See Also

Elements	TranslationX property, TranslationZ property, SetTranslation method


TranslationZ property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double TranslationZ

Overview	Refer to Working with Vector Objects

Remarks

(Read only) Gets the translation value for the Z axis. This property is set when you call the SetTranslation method.

See Also

Elements	TranslationX property, TranslationY property, SetTranslation method


Undo method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short Undo (long nFlags);

Overview	Refer to Undoing and Redoing Automation Operations

Remarks

Undoes the last automation operation performed in the active automation container.

The number of automation operations that can be undone is contained in the UndoLevel property.

To determine whether an automation operation can be undone, call the CanUndo method.

The Undo method must be called at least once in order to perform a "redo" using the Redo method.

For information about grouping multiple operations into a single undo process, refer to the AddUndoNode method.

See Also

Elements	UndoLevel property, CanUndo method, AddUndoNode method, EnableUndo method, CanRedo method, Redo method

Topics:	Vector Automation: Undoing/Redoing Operations


nFlags Parameter For Undo
nFlags

Reserved for future use. Use 0.


Returns For Undo
Return Value

Return	Meaning

0	The method was successful.

<> 0 	An error occurred. Refer to Error Codes.


UndoLevel property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long UndoLevel

Overview	Refer to Undoing and Redoing Automation Operations

Remarks

Gets or sets the undo level for the automation container.

The undo level determines the number of automation operations that can be done within an automation container.

See Also

Elements	CanUndo method, Undo method

Topics:	Vector Automation: Undoing/Redoing Operations


UnlockSupport method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void UnlockSupport (short iType, BSTR pszKey);

Overview	Refer to General Support.

Remarks

Unlocks support for an optional feature, such as LEADTOOLS Document/Medical capabilities.

For information about LEADTOOLS Document/Medical capabilities, contact LEAD.

Note: UnlockSupport can be replaced by entering the appropriate keys in LTOCX14.LIC. Edit the LTOCX14.LIC file and append at the end of a line, and on the same line, one or more pairs in the form |L_SUPPORT_xxx=key. The keys that can be specified are:

L_SUPPORT_BARCODES_1D
L_SUPPORT_BARCODES_PDF_READ
L_SUPPORT_BARCODES_PDF_WRITE
L_SUPPORT_BARCODES_DATAMATRIX_READ
L_SUPPORT_BARCODES_DATAMATRIX_WRITE
L_SUPPORT_BITONAL
L_SUPPORT_CMW
L_SUPPORT_DICOM
L_SUPPORT_DOCUMENT
L_SUPPORT_EXTGRAY
L_SUPPORT_J2K
L_SUPPORT_MEDICAL
L_SUPPORT_MEDICAL_NET
L_SUPPORT_OCR
L_SUPPORT_VECTOR
L_SUPPORT_LTPRO

For example, if you wanted to unlock DICOM and VECTOR support, you would include the following at the end of a line:

|L_SUPPORT_DICOM=dicomkey|L_SUPPORT_VECTOR=veckey

See Also

Elements	IsSupportLocked method


iType Parameter For UnlockSupport
iType

The optional feature to unlock.

Value	Meaning
L_SUPPORT_BARCODES_1D	Support for reading and writing Linear bar codes. This is available in the LEADTOOLS 1D Module.
L_SUPPORT_BARCODES_PDF_READ	Support for reading PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (read).
L_SUPPORT_BARCODES_PDF_WRITE	Support for writing PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (write).
L_SUPPORT_BARCODES_DATAMATRIX_READ	Support for reading Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (read).
L_SUPPORT_BARCODES_DATAMATRIX_WRITE	Support for writing Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (write).
L_SUPPORT_BITONAL	Support for Scale to Gray and Favor Black processing.
L_SUPPORT_CMW	Support for the CMW file format, which uses Wavelet CMP compression.
L_SUPPORT_DICOM	DICOM file format support, but not the DICOM Communication support.
L_SUPPORT_DOCUMENT	LEADTOOLS Document features . A LEADTOOLS Document license is required
L_SUPPORT_EXTGRAY	Support for 12 bit grayscale, 16-bit grayscale, 48-bit color and 64-bit color image creation and manipulation.
L_SUPPORT_ICR	Support for the ICR Module within the OCR engine. This supports the recognition of handwritten text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_J2K	Unlocks support for JPEG2000 images. The support needs to be unlocked to read and write both types of JPEG 2000 images (JPEG 2000 stream and JP2 files).
L_SUPPORT_LTPRO	Support for advanced image processing functions only available in the Raster Pro and above toolkits.
L_SUPPORT_MEDICAL	Support for the capabilities unlocked by L_SUPPORT_DICOM and L_SUPPORT_EXTGRAY, plus all Medical features.
L_SUPPORT_MEDICAL_NET	Support for everything unlocked by L_SUPPORT_MEDICAL, plus support for the unsecure DICOM Network Communication for Message Exchange.
L_SUPPORT_OCR	Support for the OCR features. (Document/Medical).
L_SUPPORT_OCR_ASIAN	Support for the OCR engine to recognize Asian text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_OCR_PDF_OUTPUT	Support for saving OCR results as a PDF file. This license is in addition to the cost of the OCR Plugin or Document Imaging Suite.
L_SUPPORT_OMR	Support for the OMR Module within the OCR engine. This supports the recognition of check boxes. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_PDF	Support for the PDF, PS and EPS file formats. Available only in the LEADTOOLS PDF Plug in. If this support is locked, the PDF, PS and EPS files will not be loaded or saved.
L_SUPPORT_PDF_SAVE	Support for saving raster images as a PDF file. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_VECTOR	Support for the Vector Features and Vector file formats. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selection.


pszKey Parameter For UnlockSupport
pszKey

The key to unlock the feature.


Return for UnlockSupport
Return Value

None.


UseDoubleBuffer property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL UseDoubleBuffer

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the UseDoubleBuffer flag which indicates whether double buffering is used or not. Possible values are:

Value	Meaning

TRUE	Use double buffering when drawing vectors.

FALSE	Do not use double buffering.

Note: Setting this property will free any existing vector image.


UseLights property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BOOL UseDoubleBuffer

Overview	Refer to Viewing a Vector Image

Remarks

Enables or disables using lights when drawing a vector. Possible values are:

Value	Meaning

TRUE	Use lights when drawing a vector.

FALSE	Do not use lights when drawing a vector.

If the use of lights is disabled, ambient light will have no effect on how the image is drawn, and polygons will be drawn using solid shading.

This property has no effect in the GDI engine.

See Also

Elements	AmbientColor property, Dlg3DoptionsUseLights property, Dlg3DoptionsAmbientColor property,


VectorContainer event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void VectorContainer (short nEventType, short nObjectType, short nState, short nStatus);

Overview	Refer to Handling Container Events

Remarks

Occurs whenever the user uses the Vector Automation to create an object, select objects, etc.

See Also

Elements	AutoPointX property, AutoPointY property, AutoPointZ property, AutoString property, AutoStringHeight property, AutoStringLeft property, AutoStringTop property, AutoStringWidth property, AutoRadius property, AutoStartAngle property, AutoSweepAngle property

Topics:	Vector Automation: Container Events


nEventType Parameter For VectorContainer
nEventType

The type of event. Possible values are:

Value	Meaning

VECTOR_CONTAINER_EVENT_ERROR	An error has occurred.

VECTOR_CONTAINER_EVENT_DRAW	An object is being drawn.

If nEventType is VECTOR_CONTAINER_EVENT_ERROR, then the nStatus parameter will contain the error code. Otherwise, nStatus contains 0.

If nEventType is VECTOR_CONTAINER_EVENT_DRAW, then the nObjectType parameter contains the type of object being drawn and nState will contain the drawing state. Otherwise, nObjectType and nState will both be 0.


nObjectType Parameter For VectorContainer
nObjectType

Type of object being drawn. This parameter is valid only if nEventType is VECTOR_CONTAINER_EVENT_DRAW. Possible values are:

Value	Meaning

VECTOR_CONTAINER_OBJECT_TYPE_POINT	Point object

VECTOR_CONTAINER_OBJECT_TYPE_LINE	Line object

VECTOR_CONTAINER_OBJECT_TYPE_SQUARE	Square object

VECTOR_CONTAINER_OBJECT_TYPE_RECT	Rectangle object

VECTOR_CONTAINER_OBJECT_TYPE_CIRCLE	Circle object

VECTOR_CONTAINER_OBJECT_TYPE_ELLIPSE	Ellipse object

VECTOR_CONTAINER_OBJECT_TYPE_POLYLINE	Polyline object

VECTOR_CONTAINER_OBJECT_TYPE_BEZIER	Bezier object

VECTOR_CONTAINER_OBJECT_TYPE_ARC	Arc object

VECTOR_CONTAINER_OBJECT_TYPE_TEXT	Text object

Please note that certain Vector Container Objects handle the drawing of more than one type of vector object. For example, the VECTOR_CONTAINER_OBJECT_TYPE_ARC will also handle the drawing of vector pie objects and vector chord objects.


nState Parameter For VectorContainer
nState

The current drawing state. This parameter is only valid if nEventType is VECTOR_CONTAINER_EVENT_DRAW. Possible values are:

Value	Meaning

VECTOR_CONTAINER_STATE_BEGIN

VECTOR_CONTAINER_STATE_PROCESS

VECTOR_CONTAINER_STATE_END

VECTOR_CONTAINER_STATE_ABORT


nStatus Parameter For VectorContainer
nStatus

Status of an error event.  When nEventType ios VECTOR_CONTAINER_EVENT_ERROR, this parameter contains the error code.  Otherwise, this parameter contains 0.


Vector property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long vector

Overview	Refer to Working with Vector Handles.

Remarks

The handle to the vector image.

You can copy an image from another control by assigning from another Vector Control's Vector property.


VectorGroups event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void VectorGroups (ILEADVectorGroup *pGroup);

Overview	Refer to Working with Vector Groups

Remarks

This event is generated for each vector group enumerated by the EnumGroups method.

For more information about the ILEADVectorGroup interface, refer to Vector Interfaces.

See Also

Elements	EnumGroups method

Topics	Using Vector Dialogs
Working with Vector Groups


pGroup Parameter For VectorGroups
pGroup

Vector interface of the group being enumerated.


VectorLayers event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void VectorLayers (ILEADVectorLayer Layer);

Overview	Refer to Working with Vector Layers

Remarks

This event is generated for each vector layer enumerated by the EnumLayers method.

For more information about the ILEADVectorLayer interface, refer to Vector Interfaces.

See Also

Elements	EnumLayers method

Topics	Getting/Setting Vector Layer Information


Layer Parameter For VectorLayers
Layer

Vector interface of the layer being enumerated.


VectorUserMode property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VectorUserModeConstants VectorUserMode

Overview	Refer to Automation Container

Remarks

Enables or disables Vector Automation. Possible values are:

Value	Meaning

VECTOR_USERMODE_MANUAL	Disable automation mode.

VECTOR_USERMODE_AUTO	Enable automation mode.

See Also

Elements	AutoContainer property, AutomationProps property

Topics	Vector Automation: Automation Container


VertexBindMode property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short VertexBindMode

Overview	Refer to Working with Vector Objects

Remarks

Gets or sets the vertex bind mode. This indicates whether all objects sharing vertices are changed when one object is changed. Possible values are:

Value	Meaning

VECTOR_BIND_VERTICES	Vertices are bound. If changes occur to an object, all other objects sharing vertices with that object will be changed too.

VECTOR_UNBIND_VERTICES	Vertices are not bound. If changes occur to an object, Other objects sharing vertices with that object will not be effected.

This property has no effect when using the DirectX engine.

See Also

Elements	SetRotation method, SetScaling method, SetTranslation Method


VectorEngine property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short VectorEngine

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the engine to use when rendering vector images. Possible values are:

Value	Meaning

VECTOR_ENGINE_GDI	Use GDI rendering. (No lights and shading).

VECTOR_ENGINE_OPENGL	Use OpenGL rendering.

Loads one of the supported vector engines.

After the VECTOR engine is successfully loaded, all subsequent calls to the VECTOR methods will use this engine for rendering the vector image.

Note: OpenGL and DirectX do not support the drawing of 2D objects (Text and Ellipses).

Note: Setting this property will free any existing vector image.

The default engine is the GDI.


VectorObjects event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void VectorObjects (ILEADVectorObject Object);

Overview	Refer to Working with Vector Objects

Remarks

Occurs once for each object enumerated by the EnumObjects method.

When this event occurs, the CurrentObject property will be updated with the enumerated object.

See Also

Elements	EnumObjects method, EnumVertices method, VectorVertices event


Object Parameter For VectorObject
Object

Vector object interface of the enumerated object. For more information about the vector interfaces, refer to Vector Interfaces.


VectorVertices event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void VectorVertices ();

Overview	Refer to Working with Vector Objects

Remarks

Occurs once for each vertex enumerated by the EnumVertices method.

See Also

Elements	EnumVertices method, EnumObjects method, VectorObjects event


ViewMode property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ViewMode

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the view mode used when drawing the vector. The view mode is used with the viewport to determine the resulting physical drawing extents. Possible values are:

Value	Meaning

VECTOR_VIEWMODE_FIT	Fit the drawing on the viewport keeping the aspect ratio.

VECTOR_VIEWMODE_SNAP	Snap the drawing into the viewport.
Not supported in DirectX.


ViewModeDlgViewMode property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ViewModeDlgViewMode

Overview	Refer to Vector Dialogs

Remarks

Contains a view mode value. The value present in this property when the ShowViewModeDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowRenderDlg method, the value used to initialize the dialog will come from the ViewMode property of the vector handle. When the ShowViewModeDlg method returns, this property is updated with the value entered through the dialog. Possible values are:

Value	Meaning

VECTOR_VIEWMODE_FIT	Fit the drawing on the view-port, keeping the aspect ratio.

VECTOR_VIEWMODE_SNAP	Snap the drawing into the view-port.

See Also

Elements	ShowViewModeDlg method, ViewMode property

Topics	Using Vector Dialogs


ViewportHeight property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ViewportHeight

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the height of the destination rectangle used when painting.

See Also

Elements	ViewportLeft property, ViewportTop property, ViewportWidth property


ViewportLeft property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ViewportLeft

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the X coordinate of the origin of the destination rectangle used when painting.

See Also

Elements	ViewportHeight property, ViewportTop property, ViewportWidth property


ViewportTop property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ViewportTop

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the Y coordinate of the origin of the destination rectangle used when painting.

See Also

Elements	ViewportHeight property, ViewportLeft property, ViewportWidth property


ViewportWidth property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	double ViewportWidth

Overview	Refer to Viewing a Vector Image

Remarks

Gets or sets the width of the destination rectangle used when painting.

See Also

Elements	ViewportHeight property, ViewportLeft property, ViewportTop property


VectorEvent event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void VectorEvent (short nEvent, short nStatus, long nLevel, short nErrorCode, ILEADVectorObject *pObject, ILEADVectorLayer *pLayer, double x1, double y1, double z1, double x2, double y2, double z2, long dwFlags);

Overview	Vector Handle Events.

Remarks

Occurs for every action taken inside the vector handle.

The nEvent parameter will correspond to the vector method called, for example if you call the Free method, an event of type VECTOREVENT_FREE will be fired.

The following table lists all the defined event types plus values for the structure variables, when defined.  Not all structure members are defined for every event. For example, the Object member is not defined for a VECTOREVENT_FREE event, but it is defined for the VECTOREVENT_TRANSLATION event. The data contained in the pObject parameter corresponds to the data passed to the SetTranslation method.

The following table lists all the defined event types plus values for the structure variables, when defined.  Not all structure members are defined for every event. For example, the Object member is not defined for a VECTOREVENT_FREE event, but it is defined for the VECTOREVENT_TRANSLATION event. The data contained in the pObject parameter corresponds to the data passed to the SetTranslation method.

Event (uType)	Function	pObject	pLayer	x1, y1, z1	x2, y2, z2	dwFlags
VECTOREVENT_FREE	Free method	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_EMPTY	Empty method	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_COPY	Copy method	Not used	Not used	Not used	Not used	nFlags
VECTOREVENT_VIEWPORT	Set the following properties: ViewportLeft ViewportTop ViewportWidth ViewportHeight	Not used	Not used	ViewportLeft ViewportTop	ViewportWidth ViewportHeight	Not used
VECTOREVENT_PAN	Set the following properties: PanX PanY	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_LOCKED	Set the following properties: Locked	Not used	Not used	Not used	Not used	Locked property
VECTOREVENT_BACKGROUND	Set the following properties: BackColor	Not used	Not used	Not used	Not used	BackColor
VECTOREVENT_PALETTE	Internal	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_VIEWMODE	Set the following properties: ViewMode	Not used	Not used	Not used	Not used	ViewMode property
VECTOREVENT_TRANSLATION	SetTranslation method	The modified object(s). *	Not used	fTranslationX fTranslationY fTranslationZ	Not used	nFlags
VECTOREVENT_ROTATION	SetRotation method	The modified object(s). *	Not used	fAngleX fAngleY fAngleZ	fOriginX fOriginY  fOriginZ	nFlag
VECTOREVENT_SCALE	SetScaling method	The modified object(s). *	Not used	fScaleX fScaleY fScaleZ	fOriginX fOriginY fOriginZ	nFlag
VECTOREVENT_ORIGIN	Set the following properties: OriginX OriginY OriginZ	Not used	Not used	OriginX OriginY OriginZ	Not used	Not used
VECTOREVENT_APPLYTRANSFORMATION	ApplyTransformation method	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_BINDVERTICESMODE	Set the following properties: VertexBindMode	Not used	Not used	Not used	Not used	VertexBindMode
VECTOREVENT_PARALLELOGRAM	Set the following properties: ParallelogramMinX ParallelogramMinY ParallelogramMinZ ParallelogramMaxX ParallelogramMaxY ParallelogramMaxZ	Not used	Not used	ParallelogramMinX ParallelogramMinY ParallelogramMinZ	ParallelogramMaxX ParallelogramMaxY ParallelogramMaxZ	Not used
VECTOREVENT_CAMERA	Set the following properties: CameraTheta CameraPhi CameraLookAtX CameraLookAtY CameraLookAtZ CameraDistance CameraUsePerspective	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_METAFILE	Internal	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_ATTACHTOWINDOW	Internal	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_MARKER	Set the following properties: MarkerPenStyle MarkerPenWidth MarkerPenColor MarkerBrushStyle MarkerBrushColor MarkerBrushHatch	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_HITTEST	Set the following properties: HitTestFlags HitTestDistance	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_POLYGONMODE	Set the following properties: PolygonMode	Not used	Not used	Not used	Not used	PolygonMode property
VECTOREVENT_USELIGHTS	Set the following properties: UseLights	Not used	Not used	Not used	Not used	UseLights property
VECTOREVENT_AMBIENTCOLOR	Set the following properties: AmbientColor	Not used	Not used	Not used	Not used	AmbientColor property
VECTOREVENT_COPYFROMCLIPBOARD	AutoPaste method Paste method	Not used	Not used	Not used	Not used	nFlags
VECTOREVENT_ADDLAYER	AddLayer method	Not used	The modified layer	Not used	Not used	nFlags
VECTOREVENT_DELETELAYER	ILEADVectorLayer::Delete method	Not used	The modified layer	Not used	Not used	Not used
VECTOREVENT_EMPTYLAYER	ILEADVectorLayer::Empty method	Not used	The modified layer	Not used	Not used	Not used
VECTOREVENT_COPYLAYER	CopyLayer method	Not used	Destination Layer	Not used	Not used	Not used
VECTOREVENT_SETLAYER	ILEADVectorLayer::Name property ILEADVectorLayer::Visible property ILEADVectorLayer::Locked property ILEADVectorLayer::UserTag property	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_SETACTIVELAYER	ILEADVectorLayer::SetActive method	Not used	The modified layer	Not used	Not used	Not used
VECTOREVENT_ADDOBJECT	ILEADVectorObject::Insert method	The modified object(s). *	The modified layer	Not used	Not used	Not used
VECTOREVENT_DELETEOBJECT	DeleteObjects method ILEADVectorObject::Delete method	The modified object(s). *	Not used	Not used	Not used	nFlags
VECTOREVENT_COPYOBJECT	CopyObject method	The modified object(s). *	Not used	Not used	Not used	Not used
VECTOREVENT_SETOBJECT	Setting any of the ILEADVectorObject properties	The modified object	Not used	Not used	Not used	NType
VECTOREVENT_EXPLODEOBJECT	ExplodeObjects method	The modified object(s). *	Not used	Not used	Not used	nFlag
VECTOREVENT_SELECTOBJECT	Set the ILEADVectorObject::Selected property	The modified object(s). *	Not used	Not used	Not used	ILEADVectorObject::Selected property
VECTOREVENT_OBJECTATTRIBUTES	Internal	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_LOADFILE	Load method	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_ADDGROUP	AddGroup method	Not used	Not used	Not used	Not used	nFlags
VECTOREVENT_DELETEGROUP	ILEADVectorGroup::Delete method	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_DELETEGROUPCLONES	ILEADVectorGroupDeleteClones method	Not used	Not used	Not used	Not used	nFlags
VECTOREVENT_EMPTYGROUP	ILEADVectorGroup::Empty method	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_SETGROUP	ILEADVectorGroup::Name property ILEADVectorGroup::UserTag property	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_COPYGROUP	CopyGroup method	Not used	Not used	Not used	Not used	nFlags
VECTOREVENT_ADDOBJECTTOGROUP	ILEADVectorObject::InsertInGroup method	Not used	Not used	Not used	Not used	Not used
VECTOREVENT_CREATENEWWINDOW	ILEADVectorObject::GotoHyperlink	The target object which should be displayed in a new window.	Not used	Not used	Not used	Not used
VECTOREVENT_INVERTCOLORS	ILEADVectorObject::InvertColors	Not used	Not used	Not used	Not used	Not used

The events VECTOREVENT_USER to (VECTOREVENT_RESERVED-1) are user-defined. You can use any of these values when implementing your own events using VectorEvent method.

To understand event levels, consider this example:

Assume the clipboard contains a vector handle with 1 layer and 2 objects inside this layer.

Now you execute the AutoPaste method, the toolkit may fire these events in the following sequence:

pEvent->uType	pEvent->Status	uLevel	Comment
VECTOREVENT_COPYFROMCLIPBOARD	VECTOREVENT_STATUS_BEFORE	0	AutoPaste is about to execute.
VECTOREVENT_ADDLAYER	VECTOREVENT_STATUS_BEFORE	1	AddLayer method is about to execute.
VECTOREVENT_ADDOBJECT	VECTOREVENT_STATUS_BEFORE	2	AddNewObject for the first object is about to execute.
VECTOREVENT_ADDOBJECT	VECTOREVENT_STATUS_AFTER	2	AddNewObject for the first object has been completed.
VECTOREVENT_ADDOBJECT	VECTOREVENT_STATUS_BEFORE	2	AddNewObject for the second object is about to execute.
VECTOREVENT_ADDOBJECT	VECTOREVENT_STATUS_AFTER	2	AddNewObject for the second object has been completed.
VECTOREVENT_ADDLAYER	VECTOREVENT_STATUS_AFTER	1	AddLayer has been completed.
VECTOREVENT_COPYFROMCLIPBOARD	VECTOREVENT_STATUS_AFTER	0	AutoPaste has been completed.
See Also

Elements	VectorEvent method


nEvent Parameter For VectorEvent event
nEvent

The type of event that was generated. For a list of possible values, refer to the Remarks section.


nStatus Parameter For VectorEvent event
nStatus

Status of the event. Possible values are:

Value	Meaning

VECTOREVENT_STATUS_BEFORE	The action that generated the event is about to be taken.

VECTOREVENT_STATUS_AFTER	The action that generated the event was just completed.


nLevel Parameter For VectorEvent event
nLevel

Level of the event that occurred. For a top-level event, this value is 0. For a second level event this value is 1, etc. For an example, refer to the Remarks section


nErrorCode Parameter For VectorEvent event
nErrorCode

Error code associated with the event. For a list of possible values, refer to the Error Codes.


pObject Parameter For VectorEvent event
pObject

The vector object associated with the event. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


pObject

The information contained in this pObject parameter varies depending on the value set in the Flags parameter of the corresponding method.

Flag setting	pObject contains

VECTOR_ALL_OBJECTS	NULL

VECTOR_SELECTED_OBJECTS	Each selected object.

VECTOR_CURRENT_OBJECT	The object contained in the CurrentObject property.


pLayer Parameter For VectorEvent event
pLayer

The vector layer associated with the event. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


x1 Parameter For VectorEvent event
x1

The x coordinate of general point 1. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


y1 Parameter For VectorEvent event
y1

The y coordinate of general point 1. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


z1 Parameter For VectorEvent event
z1

The z coordinate of general point 1. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


x2 Parameter For VectorEvent event
x2

The x coordinate of general point 2. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


y2 Parameter For VectorEvent event
y2

The y coordinate of general point 2. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


z2 Parameter For VectorEvent event
z2

The z coordinate of general point 2. This parameter is only valid for certain event types. For a list of the events for which this parameter is valid, refer to the table in the Remarks section.


dwFlags Parameter For VectorEvent event
dwFlags

Flag that provides processing information. This parameter is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Remarks section.


VectorEvent method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short VectorEvent (short nEvent, short nStatus);

Overview	Vector Handle Events.

Remarks

Implements a user-defined event.

This method provides a means of grouping numerous operations into one event. This method must be called twice. In the first call to this method the nStatus parameter must be set to VECTOREVENT_STATUS_BEFORE.

The second call to this method is made after the operation(s) has (have) been completed. The nStatus parameter must be set to VECTOREVENT_STATUS_AFTER to notify the vector toolkit that the operation(s) has (have) been completed successfully.

For information on the types of events the vector handle can generate, refer to the VectorEvent event.

This method generates a call to the VectorEvent event.

See Also

Elements	VectorEvent event


nEvent Parameter For VectorEvent method
nEvent

The user-defined event to generate.


nStatus Parameter For VectorEvent method
nStatus

Status of the event. Possible values are:

Value	Meaning

VECTOREVENT_STATUS_BEFORE	The action that will generate the event is about to be taken.

VECTOREVENT_STATUS_AFTER	The action that generated the event was just completed.


Return for VectorEvent method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


VectorDataPath property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	BSTR VectorDataPath

Overview	Refer to Loading and Saving Vectors

Remarks

(persistent property, available at design time) Loads the specified vector asynchronously. The value can be a local pathname or an Internet URL.

To manage the loading, you can use the ReadyStateChange event.

See Also

Elements	ReadyStateChange event

Topics	Vector Images: Loading and Saving Vectors


PreferredLoadFormat property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	long PreferredLoadFormat

Overview	Refer to Loading and Saving Vectors

Remarks

Contains the file format to try first when recognizing files for loading or getting file information, etc. For a list of possible values, refer to Formats of Input Files. For example, if your application is going to work with lots of DXF files, you can set this to FILE_DXF, before loading. Then, when a file is loaded, LEADTOOLS will test to see if the file is a DXF first. If it is not, then LEADTOOLS will continue with its normal process for recognizing a file.

Set this property to - 1 for normal behavior.

See Also

Topics	Vector Images: Loading and Saving Vectors


ReadyStateChange event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void ReadyStateChange (long ReadyState);

Overview	Refer to Loading and Saving Vectors

Remarks

Occurs when there is a change in the loading state.

The ready state is the state of an image that is loaded asynchronously using the VectorDataPath property.

See Also

Elements	VectorDataPath property

Topics	Vector Images: Loading and Saving Vectors


ReadyState Parameter For ReadyStateChange
ReadyState

The new value of the state. The following are possible values:

Value	Description

READYSTATE_LOADING	Currently loading

READYSTATE_COMPLETE	Finished loading


ZoomRect method (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	short ZoomRect (long lLeft, long lTop, long lRight, long lBottom);

Overview	Refer to Viewing a Vector Image

Remarks

Use this method to set the desired zoom rectangle inside the current view port.

Not supported in DirectX engine.

See Also

Elements	ViewportLeft property, ViewportTop property, ViewportWidth property, ViewportHeight property


lLeft Parameter For ZoomRect
lLeft

Left coordinate of the zoom rectangle.


Top Parameter For ZoomRect
lTop

Top coordinate of the zoom rectangle.


Right Parameter For ZoomRect
lRight

Right coordinate of the zoom rectangle.


Bottom Parameter For ZoomRect
lBottom

Bottom coordinate of the zoom rectangle.


Return for ZoomRect
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


EnableFontMapper property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	VARIANT_BOOL EnableFontMapper

Overview	Refer to Mapping Fonts

Remarks

Determines whether or not the FontMapper event is going to be called for all objects of the type VECTOR_TEXT.

See Also

Elements	SubstitutedFont property, FontMapper event


SubstitutedFont property (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	IFontDisp* SubstitutedFont

Overview	Refer to Mapping Fonts

Remarks

Gets or sets the font of the objects of type VECTOR_TEXT when drawing a vector image.

This property will only be effective if the EnableFontMapper property has been set to TRUE.

See Also

Elements	EnableFontMapper property, FontMapper event


FontMapper event (Vector Control)

Visual Basic example   Visual C++ 4.0 example

Syntax	void FontMapper ();

Overview	Refer to Mapping Fonts

Remarks

Occurs once for each object of the type VECTOR_TEXT if the EnableFontMapper preoperty is set to TRUE.

When this event occurs, the SubstitutedFont property will be updated with the font if the object is of the type VECTOR_TEXT.

See Also

Elements	EnableFontMapper property, SubstitutedFont property


Vector Features: Properties, methods, and events

Vector Automation: Automation Container

Vector Automation: Container Events

Vector Automation: Editing Containers

Vector Automation: Interfaces

Vector Automation: Printing

Vector Automation: Toolbar

Vector Automation: Undoing/Redoing Operations

Vector Automation: Working with Objects

Vector Images: Converting EMF/WMF Files

Vector Images: General Support

Vector Images: Getting/Setting Vector Handle Information

Vector Images: Getting/Setting Vector Layer Information

Vector Images: Loading and Saving Vector Images

Vector Images: Modifying Object Characteristics

Vector Images: Modifying Viewing Characteristics

Vector Images: Mouse and Keyboard Support

Vector Images: Using the Clipboard

Vector Images: Using Vector Dialogs

Vector Images: Help Support

Vector Images: Display Settings


Vector Images: Loading and Saving Vector Images

FeedLoad method

Load method

LoadArray method

LoadMemory method

PreferredLoadFormat property

ReadyStateChange event

Save method

SaveArray method

SaveMemory method

StartFeedLoad method

StopFeedLoad method

VectorDataPath property

VectorEngine property


Vector Images: Modifying Viewing Characteristics

General Appearance

Appearance property

AutoRepaint property

AutoScroll property

BackColor property

BackErase property

BorderStyle property

ForceRepaint method

PanX property

PanY property

PolygonMode property

UseDoubleBuffer property

ZoomRect method

Camera properties

CameraDistance property

CameraDlgDistance property

CameraDlgLookAtX property

CameraDlgLookAtY property

CameraDlgLookAtZ property

CameraDlgPhi property

CameraDlgTheta property

CameraDlgUsePerspective property

CameraDlgZoom property

CameraLookAtX property

CameraLookAtY property

CameraLookAtZ property

CameraPhi property

CameraTheta property

CameraUsePerspective property

CameraZoom property

ShowCameraDlg method

Rendering Options

AmbientColor property

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property

ShowRenderDlg method

UseLights property

View properties

ViewMode property

ViewportHeight property

ViewportLeft property

ViewportTop property

ViewportWidth property


Vector Images: Modifying Object Characteristics

General properties

ArraySize method

CurrentObject property

LogicalX property

LogicalY property

LogicalZ property

PhysicalX property

PhysicalY property

StopEnum property

VertexBindMode property

Vector property

EnableFontMapper property

SubstitutedFont property

General methods and events

AddNewObject method

CopyObject method

DeleteObjects method

ExplodeObjects method

Free method

LogicalToPhysical method

PhysicalToLogical method

Realize method

Reset method

Resize event

SelectAllObjects method

FontMapper event

Getting object information

EnumObjects method

EnumVertices method

HitTest method

HitTestDistance property

HitTestFlags property

Is3D method

IsAnObjectSelected method

VectorObjects event

VectorVertices event

Object Boundaries

GetObjectsParallelogram method

GetObjectsRect method

IsObjectsInsideParallelogram method

IsObjectsInsideRect method

LogicalX property

LogicalY property

LogicalZ property

ObjectParallelogramLeftTopX property

ObjectParallelogramLeftTopY property

ObjectParallelogramLeftTopZ property

ObjectParallelogramRightBottomX property

ObjectParallelogramRightBottomY property

ObjectParallelogramRightBottomZ property

ObjectRectHeight property

ObjectRectLeft property

ObjectRectTop property

ObjectRectWidth property

Geometric Transformation

ApplyTransformation method

RotationDlgOriginX property

RotationDlgOriginY property

RotationDlgOriginZ property

RotationDlgX property

RotationDlgY property

RotationDlgZ property

RotationX property

RotationY property

RotationZ property

ScaleDlgOriginX property

ScaleDlgOriginY property

ScaleDlgOriginZ property

ScaleDlgX property

ScaleDlgY property

ScaleDlgZ property

ScalingX property

ScalingY property

ScalingZ property

SetRotation method

SetScaling method

SetTranslation method

ShowRotateDlg method

ShowScaleDlg method

ShowTranslateDlg method

TranslateDlgX property

TranslateDlgY property

TranslateDlgZ property

TranslationX property

TranslationY property

TranslationZ property

Client Area

ScaleHeight property

ScaleLeft property

ScaleMode property

ScaleTop property

ScaleWidth property


Vector Images: Mouse and Keyboard Support

Click event

DblClick event

KeyDown event

KeyPress event

KeyUp event

MouseDown event

MouseIcon property

MouseMove event

MousePointer property

MouseUp event


Vector Images: Converting EMF/WMF Support

ConvertFromEMFHandle method

ConvertFromEMFPicture method

ConvertFromWMFHandle method

ConvertFromWMFPicture method

ConvertToEMFHandle method

ConvertToEMFPicture method

ConvertToWMFHandle method

ConvertToWMFPicture method


Vector Images: Events

VectorEvent method

VectorEvent event


Vector Images: General Support

EnableMethodErrors property

IsSupportLocked method

UnlockSupport method


Vector Images: Printing Images

AutoRender method

PrintEnd method

PrintStart method

Render method


Vector Images: Using the Clipboard

ClipboardReady method

Copy method

Paste Method


Vector Images: Getting/Setting Vector Group Information

AddGroup method

CopyGroup method

EnumGroups method

GetGroupByIndex method

GetGroupByName method

GroupCount property

VectorGroups event


Vector Images: Getting/Setting Vector Handle Information

CopyFlags property

Empty method

IsEmpty method

IsAnObjectHidden method

Locked property

MarkerBrushColor property

MarkerBrushHatch property

MarkerBrushStyle property

MarkerPenColor property

MarkerPenStyle property

MarkerPenWidth property

OriginX property

OriginY property

OriginZ property

ParallelogramMinX property

ParallelogramMinY property

ParallelogramMinZ property

ParallelogramMaxX property

ParallelogramMaxY property

ParallelogramMaxZ property

Reset method

Vector property


Vector Images: Getting/Setting Vector Layer Information

AddLayer method

CopyLayer method

EnumLayers method

GetActiveLayer method

GetLayerByIndex method

GetLayerByName method

LayerCount property

VectorLayers event


Vector Images: Using Vector Dialogs

Camera Dialog

ShowCameraDlg method

CameraDlgDistance property

CameraDlgLookAtX property

CameraDlgLookAtY property

CameraDlgLookAtZ property

CameraDlgUsePerspective property

CameraDlgPhi property

CameraDlgTheta property

Edit All Layers

ShowEditAllLayersDlg method

Edit Layer

ShowEditLayerDlg method

EditLayerDlgActiveLayer property

Edit Object

ShowEditObjectDlg method

General Properties

GetDlgString method

SetDlgString method

Group

NewGroupDlgName property

ShowEditAllGroupsDlg method

ShowEditGroupDlg method

ShowNewGroupDlg method

HitTest

ShowHitTestDlg method

HitTestDlgFlags property

HitTestDlgDistance property

New Layer

ShowNewLayerDlg method

NewLayerDlgActiveLayer property

NewLayerDlgLocked property

NewLayerDlgName property

NewLayerDlgUserTag property

NewLayerDlgVisible property

New Object

ShowNewObjectDlg method

Render

ShowRenderDlg method

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property

Rotate

ShowRotateDlg method

RotationDlgX property

RotationDlgY property

RotationDlgZ property

RotationDlgOriginX property

RotationDlgOriginY property

RotationDlgOriginZ property

Scale

ShowScaleDlg method

ScaleDlgOriginX property

ScaleDlgOriginY property

ScaleDlgOriginZ property

ScaleDlgX property

ScaleDlgY property

ScaleDlgZ property

Translate

ShowTranslateDlg method

TranslateDlgX property

TranslateDlgY property

TranslateDlgZ property

ViewMode

ShowViewModeDlg method

ViewModeDlgViewMode property


Vector Images: Using Vector Groups

AddGroup method

CopyGroup method

EnumGroups method

GetGroupByIndex method

GetGroupByName method

GroupCount property

NewGroupDlgName property

ShowEditAllGroupsDlg method

ShowEditGroupDlg method

ShowNewGroupDlg method

VectorGroups event


Vector Images: Vector Handle Events

VectorEvent event

VectorEvent method


Vector Images: Help Support

EnableDlgHelpButton Property

EnableHelp property

Help Event


Vector Images: Display Settings

AntiAliasingDim Property

AntiAliasingFilter Property

AntiAliasingThreshold Property

ClipMode Property

InvertColors method

RenderTextAsCurves Property


Vector Automation: Automation Container

AutoContainer property

AutomationProps property

VectorUserMode property


Vector Automation: Container Events

AutoPointCount property

AutoPointX property

AutoPointY property

AutoPointZ property

AutoRadius property

AutoStartAngle property

AutoString property

AutoStringHeight property

AutoStringLeft property

AutoStringTop property

AutoStringWidth property

AutoSweepAngle property

VectorContainer event


Vector Automation: Editing Container
Vector Automation: Editing Containers

AutoCopy method

AutoCut method

AutoDelete method

AutoPaste method


Vector Automation: Interfaces

AutoContainer property

AutomationProps property


Vector Automation: Printing

AutoRender method


Vector Automation: Toolbar

ToolbarControl property


Vector Automation: Undoing/Redoing Operations

AddUndoNode method

CanRedo method

CanUndo method

EnableUndo method

Redo method

Undo method

UndoLevel property


Vector Automation: Working with Objects

AutoEditObject method

AutoSelect method


Tutorial for Visual Basic Programmers

The following topics provide brief and simple examples to help you learn how to use the LEADTOOLS Vector features ActiveX.

Note:	These tutorial examples are intended to be easy to understand and easy to test. The example programs in the EXAMPLES subdirectory provide more in depth design and more detailed code.

General Tutorials

Creating an Empty Vector (Visual Basic)

Vector Load and Save (Visual Basic)

Transformation (Visual Basic)

Using the Camera (Visual Basic)

Using Vector Engines (Visual Basic)

Implementing Hit Testing (Visual Basic)

Working with layers (Visual Basic)

Adding and Displaying Vector Objects (Visual Basic)

Automation Tutorials

Implementing Vector Automation (Visual Basic)

Adding The Automation Container (Visual Basic)

Setting Vector Automation Properties (Visual Basic)

The Undo/Redo Capabilities (Visual Basic)

Miscellaneous Examples (Visual Basic)


Creating an Empty Vector (Visual Basic)

Take the following steps to start a project and to add some code that displays a vector on the main form:

1.	Start Visual Basic.

2.	Add the LEAD Vector Control to your project.

For VB5: On the Project pull-down menu, use the Components option, and select the Lead Vector Control (14.0).

3.	Select the LEAD Vector control; then add the control to your main form.

4.	Add the following initialization code to the main form's Load procedure. In online help, you can use the Edit pull-down menu to copy the block of code.

Private Sub Form_Load()
  LEADVector1.UnlockSupport L_SUPPORT_VECTOR, "TestKey1"
  LEADVector1.UnlockSupportL_SUPPORT_VECTOR_ALL, "TestKey2"

  'size and position the control
  LEADVector1.Top = 0
  LEADVector1.Left = 0
  LEADVector1.Width = ScaleWidth / 2
  LEADVector1.Height = ScaleHeight / 2

  ' set wireframe mode
  LEADVector1.PolygonMode = VECTOR_POLYGON_LINE

  ' set default view
  LEADVector1.Reset VECTOR_RESET_ALL
End Sub

5.	Add the following function to your form's Resize procedure.

Private Sub Form_Resize()
  'size and position the control
  LEADVector1.Top = 0
  LEADVector1.Left = 0
  LEADVector1.Width = ScaleWidth / 2
  LEADVector1.Height = ScaleHeight / 2
End Sub

6.	Run your program to test it.

7.	Save the project to use as a starting point for other tasks in this tutorial.


Vector Load and Save (Visual Basic)

Take the following steps to add vector load and save functionality:

1.	Start with the project that you created in Creating an Empty Vector (Visual Basic).

2.	Add two command buttons to your form and name them as follows:

Name	Caption

LoadVec	Load

SaveVec	Save

3.	Code the LoadVec button's click procedure as follows:

Private Sub LoadVec_Click()
  Dim nRet As Integer
  ' open a vector file, please change the path to your system
  nRet = LEADVector1.Load ("s:\temp\images\dxf\test.dxf")
  If (nRet <> 0) Then
    MsgBox "Cannot open file!"
  End If
  ' set default view
  LEADVector1.Reset VECTOR_RESET_ALL
End Sub

4.	Code the SaveVec button's click procedure as follows:

Private Sub SaveVec_Click()
  Dim nRet As Integer
  ' save a vector file, please change the path to your system
  nRet = LEADVector1.Save ("d:\temp\test.dxf", FILE_DXF)
  If (nRet <> 0) Then
    MsgBox "Cannot save file!"
  End If
End Sub

5.	Run your program to test it.

6.	Save the project to use in other tutorials.


Transformation (Visual Basic)

Take the following steps to add scale, rotation and translation to the sample program:

1.	Start with the project that you created in Vector Load and Save (Visual Basic).

2.	Code the LEAD Vector Control's KeyDown procedure as follows:

Private Sub LEADVector1_KeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer)
    Select Case KeyCode
        Case vbKeyX
            LEADVector1.SetRotation LEADVector1.RotationX + 5#, _
                                    LEADVector1.RotationY, _
                                    LEADVector1.RotationZ, _
                                    0, 0, 0, False, VECTOR_ALL_OBJECTS
        Case vbKeyY
            LEADVector1.SetRotation LEADVector1.RotationX, _
                                    LEADVector1.RotationY + 5#, _
                                    LEADVector1.RotationZ, _
                                    0, 0, 0, False, VECTOR_ALL_OBJECTS
        Case vbKeyZ
            LEADVector1.SetRotation LEADVector1.RotationX, _
                                    LEADVector1.RotationY, _
                                    LEADVector1.RotationZ + 5#, _
                                    0, 0, 0, False, VECTOR_ALL_OBJECTS
        Case vbKeyAdd
            LEADVector1.SetScaling LEADVector1.ScalingX + 0.1, _
                                   LEADVector1.ScalingY + 0.1, _
                                   LEADVector1.ScalingZ + 0.1, _
                                   0, 0, 0, False, VECTOR_ALL_OBJECTS
        Case vbKeySubtract
            LEADVector1.SetScaling LEADVector1.ScalingX - 0.1, _
                                   LEADVector1.ScalingY - 0.1, _
                                   LEADVector1.ScalingZ - 0.1, _
                                   0, 0, 0, False, VECTOR_ALL_OBJECTS
        Case vbKeyI
            LEADVector1.SetTranslation LEADVector1.TranslationX, _
                                       LEADVector1.TranslationY+ 1#, _
                                       LEADVector1.TranslationZ, _
                                       VECTOR_ALL_OBJECTS
        Case vbKeyM
            LEADVector1.SetTranslation LEADVector1.TranslationX, _
                                       LEADVector1.TranslationY - 1#, _
                                       LEADVector1.TranslationZ, _
                                       VECTOR_ALL_OBJECTS
        Case vbKeyJ
            LEADVector1.SetTranslation LEADVector1.TranslationX - 1#, _
                                       LEADVector1.TranslationY, _
                                       LEADVector1.TranslationZ, _
                                       VECTOR_ALL_OBJECTS
        Case vbKeyK
            LEADVector1.SetTranslation LEADVector1.TranslationX + 1#, _
                                       LEADVector1.TranslationY, _
                                       LEADVector1.TranslationZ, _
                                       VECTOR_ALL_OBJECTS
    End Select
End Sub

3.	Run your program to test it.

4.	Save the project to use in other tutorials.


Using the Camera (Visual Basic)

Take the following steps to support for the camera:

1.	Start with the project that you created in Transformation (Visual Basic).

2.	Add the following to the code for the LEAD Vector Controls KeyDown procedure:

        Case vbKeyB
            ' flip camera projection between parallel and perspective
            If LEADVector1.CameraUsePerspective = True Then
                LEADVector1.CameraUsePerspective = False
            Else
                LEADVector1.CameraUsePerspective = True
            End If
        Case vbKeyT
            ' rotate the camera theta angle
            LEADVector1.CameraTheta = LEADVector1.CameraTheta + 5#
        Case vbKeyP
            ' rotate the camera phi angle
            LEADVector1.CameraPhi = LEADVector1.CameraPhi + 5#

3.	Run your program to test it.

4.	Save the project to use in other tutorials.


Using Vector Engines (Visual Basic)

Take the following steps to add support for viewing vector drawing in different vector engines:

1.	Start with the project that you created in Using the Camera (Visual Basic).

2.	Add a command button to your form and name it as follows:

Name	Caption

Engine	Engine

3.	Code the Engine button's click procedure as follows:

Private Sub Engine_Click()
    Select Case LEADVector1.VectorEngine
        Case VECTOR_ENGINE_GDI
            'change to OpenGL
            LEADVector1.UseDoubleBuffer = True
            LEADVector1.VectorEngine = VECTOR_ENGINE_OPENGL
            LEADVector1.PolygonMode = VECTOR_POLYGON_FILL
            LEADVector1.UseLights = True
            LEADVector1.AmbientColor = RGB(&H3F, &H3F, &H3F)
            LEADVector1.Reset VECTOR_RESET_ALL
        Case VECTOR_ENGINE_OPENGL
            'change to GDI
            LEADVector1.UseDoubleBuffer = True
            LEADVector1.VectorEngine = VECTOR_ENGINE_GDI
            LEADVector1.PolygonMode = VECTOR_POLYGON_LINE
            LEADVector1.UseLights = True
            LEADVector1.AmbientColor = RGB(&H3F, &H3F, &H3F)
            LEADVector1.ResetVECTOR_RESET_ALL
    End Select
End Sub

4.	Run your program to test it.

5.	Save the project to use in other tutorials.


Implementing Hit Testing (Visual Basic)

Take the following steps to add support for hit testing different vector objects:

1.	Start with the project that you created in Using Vector Engines (Visual Basic).

2.	Code the LEAD Vector Controls MouseMove procedure as follows:

Private Sub LEADVector1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Double, ByVal Y As Double)
   Dim bRet As Boolean
   Dim szBuffer As String
   ' hit test object under mouse cursor
   LEADVector1.EnableMethodErrors = False
   bRet = LEADVector1.HitTest (X, Y)
   If (bRet = True) Then
      ' theres an object, show its type in main window caption
      Select Case LEADVector1.CurrentObject.Type
         Case VECTOR_VERTEX
            szBuffer = "Vertex"
         Case VECTOR_LINE
            szBuffer = "Line"
         Case VECTOR_RECTANGLE
            szBuffer = "Rectangle"
         Case VECTOR_POLYLINE
            szBuffer = "Polyline"
         Case VECTOR_POLYBEZIER
            szBuffer = "Polybezier"
         Case VECTOR_POLYGON
            szBuffer = "Polygon"
         Case VECTOR_ELLIPSE
            szBuffer = "Ellipse"
         Case VECTOR_CIRCLE
            szBuffer = "Circle"
         Case VECTOR_ARC
            szBuffer = "Arc"
         Case VECTOR_TEXT
            szBuffer = "Text"
         Case VECTOR_PIE
            szBuffer = "Pie"
         Case VECTOR_CHORD
            szBuffer = "Chord"
         Case VECTOR_RASTER
            szBuffer = "Raster"
         Case VECTOR_HPOLYBEZIER
            szBuffer = " HPolyBezier"
         Case VECTOR_SPLINE
            szBuffer = "Spline"
      End Select
   Else
      szBuffer = "No object under mouse cursor"
   End If
   Form1.Caption = szBuffer
End Sub

3.	Code the LEAD Vector Controls MouseDown procedure as follows:

Private Sub LEADVector1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Double, ByVal Y As Double)
    Dim bRet As Boolean
    If (Button = vbLeftButton) Then
        ' hit test object under mouse cursor
        bRet = LEADVector1.HitTest (X, Y)
        If (bRet = True) Then
            ' theres an object, flip its pen width between 1 and 4

          If (LEADVector1.CurrentObject.EnableExtendedPen)Then
          	 If (LEADVector1.CurrentObject.ExtendedLogicalPenWidth = 1) Then
                	LEADVector1.CurrentObject.ExtendedLogicalPenWidth = 4
            	Else
                	LEADVector1.CurrentObject.ExtendedLogicalPenWidth = 1
            	End If

            Else

            	If (LEADVector1.CurrentObject.LogicalPenWidth = 1) Then
                	LEADVector1.CurrentObject.LogicalPenWidth = 4
            	Else
                	LEADVector1.CurrentObject.LogicalPenWidth = 1
            	End If

        End If
        End If
    ElseIf (Button = vbRightButton) Then
        ' hit test object under mouse cursor
        bRet = LEADVector1.HitTest(X, Y)
        If (bRet = True) Then
            ' theres an object, delete it
            LEADVector1.CurrentObject.Delete
        End If
    End If
End Sub

4.	Run your program to test it.

5.	Save the project to use in other tutorials.


Working with layers (Visual Basic)

Take the following steps to show/hide layers from a vector drawing:

1.	Start with the project that you created in Creating an Empty Vector (Visual Basic).

2.	Add the following line after the call to UnlockSupport in your form's Load procedure.  Be sure to change the path to fit your system.  You must load an image that contains at least 2 layers for this sample to work.

  nRet = LEADVector1.Load ("d:\lead14\dist\images\vector\random.dxf")

3.	Code the LEAD Vector Control's KeyDown procedure as follows:

Private Sub LEADVector1_KeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer)
    Dim Layer As LEADVectorLayer
    Select Case KeyCode
        Case vbKey1
            ' get layer from index
            Set Layer = LEADVector1.GetLayerByIndex (0)
            ' flip the visible state of the layer
            Layer.Visible = Not Layer.Visible
        Case vbKey2
            ' get layer from index
            Set Layer = LEADVector1.GetLayerByIndex(1)
            ' flip the visible state of the layer
            Layer.Visible = Not Layer.Visible
    End Select
End Sub

4.	Run your program to test it.

5.	Save the project to use in other tutorials.


Adding and Displaying Vector Objects (Visual Basic)

Take the following steps to start adding new layer and objects to the vector handle.

1.	Start with the project that you created in Implementing Hit Testing (Visual Basic).

2.	Add two command buttons to your form and name them as follows:

Name	Caption

AddLayer	AddLayer

AddObject	AddObject

3.	Code the AddLayer button's click procedure as follows:

Private Sub AddLayer_Click()
    Dim Layer As LEADVectorLayer
    ' fill in the layer descriptor structure and add new layer to the vector handle
    LEADVector1.AddLayer "Default Layer", True, False, 0, 0
    Set Layer = LEADVector1.GetLayerByName ("Default Layer")
    ' make this the active layer in the vector handle
    Layer.SetActive
End Sub

4.	Code the AddObject button's click procedure as follows:

Private Sub AddObject_Click()
   Dim NewLine As LEADVectorObject
   ' add a new vector line
   Set NewLine = LEADVector1.AddNewObject (VECTOR_LINE)

   ' set the line pen
   NewLine.PenColor = vbGreen

   ' set the line start and end points
   NewLine.X(0) = 0#
   NewLine.Y(0) = 0#
   NewLine.Z(0) = 0#

   NewLine.X(0) = 50#
   NewLine.Y(0) = 50#
   NewLine.Z(0) = 0#

   ' add the object to the active layer
   NewLine.Insert -1

   LEADVector1.Reset VECTOR_RESET_ALL
End Sub

5.	Run your program to test it.

6.	Save the project to use in other tutorials.


Implementing Vector Automation (Visual Basic)

Take the following steps to start a project and to add some code that implements Vector Automation:

1.	Start Visual Basic.

2.	Add the LEAD Vector Control to your project.

For VB5: On the Project pull-down menu, use the Components option, and select the LEAD Vector Control (14.0).

3.	Select the LEAD Vector control; then add the control to your main form.  Size and position the control, as you want it to appear at runtime.

4.	Add the LEAD Toolbar Control to your project.

For VB5: On the Project pull-down menu, use the Components option, and select the LEAD Toolbar Control (14.0).

5.	Select the LEAD Toolbar control; then add the control to your main form.

6.	Add the following initialization code to the main form's Load procedure. In online help, you can use the Edit pull-down menu to copy the block of code.  Be sure to change the filename to a vector file on your system.

Private Sub Form_Load()
    LEADVector1.UnlockSupport L_SUPPORT_VECTOR, "TestKey1"
    LEADVector1.UnlockSupport L_SUPPORT_VECTOR_ALL, "TestKey2"

    'load a vector image
    LEADVector1.Load "s:\temp\images\dxf\test.dxf"

    ' Turn on Vector Automation
    LEADVector1.VectorUserMode = VECTOR_USERMODE_AUTO
    LEADToolBar1.CreateToolbar LEADVector1.Window, "Vector Tools", TOOLBAR_VECTOR
    LEADVector1.ToolbarControl = LEADToolBar1 'set toolbar
    LEADToolBar1.Visible = True
End Sub

7.	Run your program to test it.

8.	Save the project to use as a starting point for other tasks in this tutorial.


Adding The Automation Container (Visual Basic)

Take the following steps to setup the Vector Automation Container:

1.	Start with the project that you created in Implementing Vector Automation.

2.	Code the LEAD Vector Control's GotFocus procedure as follows:

Private Sub LEADVector1_GotFocus ()
    If (LEADVector1.VectorUserMode = VECTOR_USERMODE_AUTO) Then
        LEADVector1.AutoContainer.SetActive 'set active container
        LEADVector1.ToolbarControl = LEADToolBar1 'set toolbar
    End If
End Sub

3.	Code the LEAD Vector Control's LostFocus procedure as follows:

Private Sub LEADVector1_LostFocus()
    LEADVector1.ToolbarControl = Nothing 'release toolbar
End Sub

4.	Code the LEAD Vector Control's MouseDown procedure as follows:

Private Sub LEADVector1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Double, ByVal Y As Double)
    LEADVector1.EnableMethodErrors = False
    LEADVector1.HitTest X, Y
End Sub

5.	Add two command buttons to your form and name them as follows:

Name	Caption

ContainerProps	ContainerProps

EditObject	EditObject

6.	Code the ContainerProps button's Click procedure as follows:

Private Sub ContainerProps_Click()
    Dim bRet As Boolean

    LEADVector1.EnableMethodErrors = False
    LEADVector1.AutoContainer.BorderColor = vbRed
    LEADVector1.AutoContainer.HandleColor = vbGreen
    LEADVector1.AutoContainer.HandleWidth = 8
    LEADVector1.AutoContainer.HandleHeight = 8
    LEADVector1.AutoContainer.EnableHandles = True
End Sub

7.	Code the EditObject button's Click procedure as follows:

Private Sub EditObject_Click()
    LEADVector1.AutoEditObject LEADVector1.CurrentObject.hObject
End Sub

8.	Run your program to test it.

a) Select an object by clicking it.

b) Click the ContainerProps button

c) Click the EditObject button

9.	Save the project to use as a starting point for other tasks in this tutorial.


Setting Vector Automation Properties (Visual Basic)

Take the following steps to set Vector Automation Properties:

1.	Start with the project that you created in Implementing Vector Automation.

2.	Add a command button to your form and name it as follows:

Name	Caption

AutoProps	AutoProps

3.	Code the AutoProps button's Click procedure as follows:

Private Sub AutoProps_Click()
    'set the pen properties
   LEADVector1.AutomationProps.EnableExtendedPen = False
   LEADVector1.AutomationProps.LogicalPenStyle = VECTOR_PS_SOLID
    LEADVector1.AutomationProps.LogicalPenWidth = 9
    LEADVector1.AutomationProps.LogicalPenColor = vbGreen
End Sub

4.	Run your program to test it.

a) Click the AutoProps button

b) Select a tool from the toolbar (such as line) and add a new object.

5.	Save the project to use as a starting point for other tasks in this tutorial.


The Undo/Redo Capabilities (Visual Basic)

Take the following steps to Add Undo/Redo Capabilities:

1.	Start with the project that you created in Implementing Vector Automation.

2.	Add three command buttons to your form and name them as follows:

Name	Caption

SetUndo	SetUndo

Undo	Undo

Redo	Redo

3.	Code the SetUndo button's Click procedure as follows:

Private Sub SetUndo_Click()
    LEADVector1.UndoLevel = 5
End Sub

4.	Code the Undo button's Click procedure as follows:

Private Sub Undo_Click()
    If (LEADVector1.CanUndo () = True) Then
        LEADVector1.Undo 0
    End If
End Sub

5.	Code the Redo button's Click procedure as follows:

Private Sub Redo_Click()
    If (LEADVector1.CanRedo () = True) Then
        LEADVector1.Redo 0
    End If
End Sub


Miscellaneous Examples (Visual Basic)

You can test the following examples by either adding a command button and pasting the sample code in the Click procedure, or by cutting and pasting event code into the appropriate event in a lesson.

AddGroup example for Visual Basic

AddHyperLinkFile example for Visual Basic

AddLayer example for Visual Basic

Appearance example for Visual Basic

AutoContainer.Enabled example for Visual Basic

AutoContainer.LimitLeft example for Visual Basic

AutoContainer.ObjectCursor example for Visual Basic

AutoCopy example for Visual Basic

AutoCut example for Visual Basic

AutoDelete example for Visual Basic

AutoEditObject example for Visual Basic

AutomationProps.BrushStyle example for Visual Basic

AutomationProps.FontHeight example for Visual Basic

AutomationProps.LogicalPenColor example for Visual Basic

AutoPaste example for Visual Basic

AutoRender example for Visual Basic

AutoScroll example for Visual Basic

AutoSelect example for Visual Basic

BorderStyle example for Visual Basic

CameraDlgUsePerspective example for Visual Basic

CameraPhi example for Visual Basic

CameraUsePerspective example for Visual Basic

Click example for Visual Basic

ClipboardReady example for Visual Basic

ClipMode example for Visual Basic

ConvertToEMFPicture example for Visual Basic

ConvertToWMFPicture example for Visual Basic

CopyFlags example for Visual Basic

CopyGroup example for Visual Basic

CopyLayer example for Visual Basic

CopyObject example for Visual Basic

CurrentObject.IsInsideParallelogram example for Visual Basic

CurrentObject.IsInsideRect example for Visual Basic

DblClick example for Visual Basic

DeleteObjects example for Visual Basic

EditLayerDlgActiveLayer example for Visual Basic

Empty example for Visual Basic

EnableHelp example for Visual Basic

EnableMethodErrors example for Visual Basic

EnableUndo example for Visual Basic

EnumGroups example for Visual Basic

EnumLayers example for Visual Basic

EnumObjects example for Visual Basic

EnumVertices example for Visual Basic

ExplodeObjects example for Visual Basic

GetActiveLayer example for Visual Basic

GetGroupByIndex example for Visual Basic

GetLayerByIndex example for Visual Basic

GetObjectsParallelogram example for Visual Basic

GetObjectsRect example for Visual Basic

HitTestDistance example for Visual Basic

HitTestDlgFlags example for Visual Basic

ILEADVectorGroup::Delete example for Visual Basic

ILEADVectorGroup::Empty example for Visual Basic

ILEADVectorLayer::Delete example for Visual Basic

ILEADVectorObject::Bitmap example for Visual Basic

ILEADVectorObject::BrushStyle example for Visual Basic

ILEADVectorObject::Delete example for Visual Basic

ILEADVectorObject::DllName example for Visual Basic

ILEADVectorObject::Explode example for Visual Basic

ILEADVectorObject::Flags example for Visual Basic

ILEADVectorObject::Hidden example for Visual Basic

ILEADVectorObject::PointCount example for Visual Basic

ILEADVectorObject::PointType example for Visual Basic

ILEADVectorObject::SectionsNumber example for Visual Basic

ILEADVectorObject::StartAngle example for Visual Basic

ILTVectorAutomation::CurrentTool example for Visual Basic

InvertColors example for Visual Basic

Is3D example for Visual Basic

IsAnObjectHidden example for Visual Basic

IsObjectsInsideParallelogram example for Visual Basic

IsObjectsInsideRect example for Visual Basic

KeyDown example for Visual Basic

KeyPress example for Visual Basic

KeyUp example for Visual Basic

LayerCount example for Visual Basic

Load example for Visual Basic

LoadMemory example for Visual Basic

Locked example for Visual Basic

LogicalToPhysical example for Visual Basic

MarkerPenStyle example for Visual Basic

MouseDown example for Visual Basic

MousePointer example for Visual Basic

MouseUp example for Visual Basic

NewLayerDlgName example for Visual Basic

ObjectParallelogramLeft example for Visual Basic

PanX example for Visual Basic

ParallelogramMinX example for Visual Basic

PhysicalToLogical example for Visual Basic

PolygonMode example for Visual Basic

PreferredLoadFormat Example for Visual Basic

Realize example for Visual Basic

Redo example for Visual Basic

RenderDlgUseLights example for Visual Basic

Render example for Visual Basic

Reset example for Visual Basic

Resize example for Visual Basic

RotationDlgOriginX example for Visual Basic

Save example for Visual Basic

SaveArray example for Visual Basic

ScaleDlgOriginX example for Visual Basic

ScaleHeight example for Visual Basic

ScaleMode example for Visual Basic

SelectAllObjects example for Visual Basic

SetDlgString example for Visual Basic

SetRotation example for Visual Basic

SetScaling example for Visual Basic

SetTranslation example for Visual Basic

Show3DOptionsDlg example for Visual Basic

ShowCameraDlg example for Visual Basic

ShowEditAllGroupsDlg example for Visual Basic

ShowEditAllLayersDlg example for Visual Basic

ShowEditGroupDlg example for Visual Basic

ShowEditObjectDlg example for Visual Basic

ShowNewObjectDlg example for Visual Basic

ShowRotateDlg example for Visual Basic

ShowScaleDlg example for Visual Basic

ShowTranslateDlg example for Visual Basic

StartFeedLoad example for Visual Basic

ToolbarControl example for Visual Basic

Tooltip example for Visual Basic

Undo example for Visual Basic

UndoLevel example for Visual Basic

UnlockSupport example for Visual Basic

UseLights example for Visual Basic

VectorContainer example for Visual Basic

VectorDataPath Example for Visual Basic

VectorEngine example for Visual Basic

VectorEvent event example for Visual Basic

VectorEvent method example for Visual Basic

VectorUserMode example for Visual Basic

VertexBindMode example for Visual Basic

ViewContext example for Visual Basic

ViewMode example for Visual Basic

ViewModeDlgViewMode example for Visual Basic

ViewportLeft example for Visual Basic

ZoomRect example for Visual Basic


AddGroup example for Visual Basic

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewGroup As LEADVectorGroup
    Dim NewLayer As LEADVectorLayer

    'setup the vector
    LEADVector1.ParallelogramMinX = 0#
    LEADVector1.ParallelogramMinY = 0#
    LEADVector1.ParallelogramMinZ = 0#

    LEADVector1.ParallelogramMaxX = 5#
    LEADVector1.ParallelogramMaxY = 5#
    LEADVector1.ParallelogramMaxZ = 0#

    LEADVector1.OriginX = 5# / 2#
    LEADVector1.OriginY = 5# / 2#
    LEADVector1.OriginZ = 0#

    LEADVector1.CameraLookAtX = LEADVector1.OriginX
    LEADVector1.CameraLookAtY = LEADVector1.OriginY
    LEADVector1.CameraLookAtZ = LEADVector1.OriginZ

    nRet = LEADVector1.AddGroup("My Group", 99, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Group!"
        Exit Sub
    End If

    Set NewGroup = LEADVector1.GetGroupByName("My Group")

    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_LINE)
    NewObject.X(0) = 0#
    NewObject.Y(0) = 0#
    NewObject.Z(0) = 0#
    NewObject.X(1) = 1#
    NewObject.Y(1) = 1#
    NewObject.Z(1) = 0#
    NewObject.PenColor = vbRed
    nRet = NewObject.InsertInGroup(NewGroup.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
        Exit Sub
    End If
    Set NewObject = Nothing
    Set NewObject = LEADVector1.AddNewObject(VECTOR_LINE)
    NewObject.X(0) = 1#
    NewObject.Y(0) = 0#
    NewObject.Z(0) = 0#
    NewObject.X(1) = 0#
    NewObject.Y(1) = 1#
    NewObject.Z(1) = 0#
    NewObject.PenColor = vbRed
    nRet = NewObject.InsertInGroup(NewGroup.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
        Exit Sub
    End If

    'create an empty layer
    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
        Exit Sub
    End If
    Set NewLayer = LEADVector1.GetLayerByName("My Layer")

    'now, clone the group
    Set NewObject = Nothing
    Set NewObject = LEADVector1.AddNewObject(VECTOR_CLONE)
    NewObject.CloneGroup = NewGroup.ID
    NewObject.X(0) = 2#
    NewObject.Y(0) = 2#
    NewObject.Z(0) = 0#

    NewObject.ScaleX = 2#
    NewObject.ScaleY = 2#
    NewObject.ScaleZ = 2#

    NewObject.RotationX = 0#
    NewObject.RotationY = 0#
    NewObject.RotationZ = 0#

    NewObject.Flags = 0 'use original settings

    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
        Exit Sub
    End If

    'now, clone the group again
    Set NewObject = Nothing
    Set NewObject = LEADVector1.AddNewObject(VECTOR_CLONE)
    NewObject.CloneGroup = NewGroup.ID
    NewObject.X(0) = 4#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 0#

    NewObject.ScaleX = 1#
    NewObject.ScaleY = 1#
    NewObject.ScaleZ = 1#

    NewObject.RotationX = 0#
    NewObject.RotationY = 0#
    NewObject.RotationZ = 45#

    NewObject.Flags = VECTOR_CLONE_USE_PEN
    NewObject.PenColor = vbBlue 'this clone will be blue
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
        Exit Sub
    End If


AddHyperLinkFile example for Visual Basic

Private Sub Test_Hyperlink()
Dim bObject As Boolean
Dim bNewWindow As Boolean
Dim nId As Long
Dim szPath As String
Dim hwndParent As Long
Dim i As Long

gLastSelectedObject.AddHyperlinkFile "c:\canoe.cgm", 0
gLastSelectedObject.AddHyperlinkObject gTargetObject, False
If (gLastSelectedObject.HyperlinkCount > 0) Then
    gLastSelectedObject.SetHyperlinkFile 0, "c:\corvette.cgm", 0
    gLastSelectedObject.SetHyperlinkObject 1, gTargetObject, True
End If

For i = 0 To gLastSelectedObject.HyperlinkCount – 1
    gLastSelectedObject.GetHyperlink i, bObject, nId, bNewWindow, szPath, hwndParent

    If (bObject) Then
        MsgBox "Target is Object"
    Else
        MsgBox "Target is the file " + szPath
    End If
Next i

'jump to the first target
gLastSelectedObject.GotoHyperlink 0

End Sub


AddLayer example for Visual Basic

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_LINE)
    NewObject.ROP = VECTOR_R2_NOTCOPYPEN
    NewObject.UserTag = 99 'set a user tag
    NewObject.X(0) = 1#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 0#
    NewObject.X(1) = 2#
    NewObject.Y(1) = 2#
    NewObject.Z(1) = 0#
    NewObject.LogicalPenColor = vbRed
    NewObject.LogicalPenStyle = VECTOR_PS_SOLID
    NewObject.LogicalPenWidth = 5
    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If

Private Sub LEADVector1_VectorObjects(ByVal pObject As LEADVectorLibCtl.ILEADVectorObject)
    If (pObject.UserTag = 99) Then 'found our UserTag
        MsgBox "Object with UserTag = 99 has ID = " & CStr(pObject.ID)
    End If
End Sub


Appearance example for Visual Basic

    'set the control to have 3d appearance
    LEADVector1.Appearance = APPEARANCE_THREED


AutoContainer.Enabled example for Visual Basic

    'toggle automation container
    If (LEADVector1.AutoContainer.Enabled = True) Then
        LEADVector1.AutoContainer.Enabled = False
    Else
        LEADVector1.AutoContainer.Enabled = True
    End If


AutoContainer.LimitLeft example for Visual Basic

Private Sub LEADVector1_Resize()
    Dim x As Long
    Dim y As Long
    x = LEADVector1.Width / Screen.TwipsPerPixelX
    y = LEADVector1.Width / Screen.TwipsPerPixelY
    If (LEADVector1.VectorUserMode = VECTOR_USERMODE_AUTO) Then
        LEADVector1.AutoContainer.LimitLeft = 0
        LEADVector1.AutoContainer.LimitTop = 0
        LEADVector1.AutoContainer.LimitWidth = x
        LEADVector1.AutoContainer.LimitHeight = y
    End If
End Sub


AutoContainer.ObjectCursor example for Visual Basic

    LEADVector1.AutoContainer.ObjectCursor (VECTOR_CONTAINER_OBJECT_TYPE_LINE) = LoadPicture("hand.cur")


AutoCopy example for Visual Basic

    LEADVector1.AutoCopy 0


AutoCut example for Visual Basic

    LEADVector1.AutoCut 0


AutoDelete example for Visual Basic

    LEADVector1.AutoDelete 0


AutoEditObject example for Visual Basic

Private Sub LEADVector1_MouseDown (ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Double, ByVal y As Double)
    LEADVector1.EnableMethodErrors = False
    If (LEADVector1.HitTest x, y = True) Then
        LEADVector1.AutoEditObject LEADVector1.CurrentObject.hObject
    End If
End Sub


AutomationProps.BrushStyle example for Visual Basic

        LEADVector1.AutomationProps.BrushStyle = VECTOR_BRUSH_HATCH
        LEADVector1.AutomationProps.HatchBrushStyle = HATCH_LINE
        LEADVector1.AutomationProps.HatchBrushPenColor = vbRed
        LEADVector1.AutomationProps.HatchBrushPenStyle = VECTOR_PS_DASH
        LEADVector1.AutomationProps.HatchBrushPenWidth = 1
        LEADVector1.AutomationProps.HatchBrushBrushStyle = VECTOR_BS_SOLID
        LEADVector1.AutomationProps.HatchBrushBrushColor = vbGreen
        case VECTOR_BRUSH_PATTERN
        LEADVector1.AutomationProps.BrushStyle = VECTOR_BRUSH_PATTERN
        LEADVector1.AutomationProps.PatternBrushBitmap = LEAD1.Bitmap
        case VECTOR_BRUSH_GRADIENT
        LEADVector1.AutomationProps.BrushStyle = VECTOR_BRUSH_GRADIENT
        LEADVector1.AutomationProps.GradeintBrushStartColor = vbBlack

LEADVector1.AutomationProps.GradeintBrushEndColor = vbYellow
LEADVector1.AutomationProps.GradientBrushSteps = 30
LEADVector1.AutomationProps.GradientBrushStyle = VECTOR_GRADIENT_LINE_L_TO_R
    End Select
   End Sub


AutomationProps.FontHeight example for Visual Basic

    LEADVector1.AutomationProps.FontHeight = 14
    LEADVector1.AutomationProps.FontUnderline = True
    LEADVector1.AutomationProps.FontItalic = True
    LEADVector1.AutomationProps.FontOrientation = 0
    LEADVector1.AutomationProps.FontEscapement = 0
    LEADVector1.AutomationProps.FontWidth = 14
    LEADVector1.AutomationProps.FontFaceName = "Bones"
    LEADVector1.AutomationProps.FontPitchAndFamily = 0
    LEADVector1.AutomationProps.FontQuality = 0
    LEADVector1.AutomationProps.FontClipPrecision = 0
    LEADVector1.AutomationProps.FontOutPrecision = 0
    LEADVector1.AutomationProps.FontCharSet = 0
    LEADVector1.AutomationProps.FontStrikeOut = True
    LEADVector1.AutomationProps.FontWeight = 700


AutomationProps.LogicalPenColor example for Visual Basic

Private Sub SetPenProperties (ByVal EnableExtendedPen As Boolean)
   If (EnableExtendedPen) Then
     LEADVector1.AutomationProps.EnableExtendedPen = True
     LEADVector1.AutomationProps.ExtendedLogicalPenStyle = PS_SOLID Or PS_ENDCAP_FLAT Or PS_JOIN_BEVEL
     LEADVector1.AutomationProps.ExtendedLogicalPenWidth = 2
     LEADVector1.AutomationProps.ExtendedLogicalPenBrushStyle = BS_SOLID
     LEADVector1.AutomationProps.ExtendedLogicalPenColor = vbRed
     LEADVector1.AutomationProps.ExtendedLogicalPenHatch = 0
     LEADVector1.AutomationProps.ExtendedLogicalPenEntriesNumber = 0
   Else

     LEADVector1.AutomationProps.EnableExtendedPen = False
     LEADVector1.AutomationProps.LogicalPenColorILTVectorAutomation = vbGreen
     LEADVector1.AutomationProps.LogicalPenStyle = VECTOR_PS_DASH
     LEADVector1.AutomationProps.LogicalPenWidth = 1
   End If

End Sub


AutoPaste example for Visual Basic

    If (LEADVector1.ClipboardReady() = True) Then
        LEADVector1.AutoPaste 0
    End If


AutoRender example for Visual Basic

    LEADVector1.AutoRender 0


AutoSelect example for Visual Basic

    LEADVector1.AutoSelect VECTOR_AUTOMATION_SELTYPE_NONE, 0


AutoScroll example for Visual Basic

    'toggle AutoScroll
    If LEADVector1.AutoScroll = True Then
        LEADVector1.AutoScroll = False
    Else
        LEADVector1.AutoScroll = True
    End If


BorderStyle example for Visual Basic

    'Set Control to have border
    LEADVector1.Appearance = 0
    LEADVector1.BorderStyle = 1


CameraDlgUsePerspective example for Visual Basic

   LEADVector1.CameraDlgDistance = LEADVector1.CameraDistance
   LEADVector1.CameraDlgUsePerspective = LEADVector1.CameraUsePerspective
   LEADVector1.CameraDlgLookAtX = LEADVector1.CameraLookAtX
   LEADVector1.CameraDlgLookAtY = LEADVector1.CameraLookAtY
   LEADVector1.CameraDlgLookAtZ = LEADVector1.CameraLookAtZ
   LEADVector1.CameraDlgPhi = LEADVector1.CameraPhi
   LEADVector1.CameraDlgTheta = LEADVector1.CameraTheta
   LEADVector1.ShowCameraDlg VECTOR_DLG_SHOWPREVIEW Or VECTOR_DLG_AUTOPROCESS


CameraUsePerspective example for Visual Basic

    LEADVector1.AutoRepaint = False
    LEADVector1.CameraTheta = 30#
    LEADVector1.CameraPhi = 20#
    LEADVector1.CameraUsePerspective = True
    LEADVector1.CameraDistance = 200

    'center the camera at the origin of the drawing
    LEADVector1.CameraLookAtX = LEADVector1.OriginX
    LEADVector1.CameraLookAtY = LEADVector1.OriginY
    LEADVector1.CameraLookAtZ = LEADVector1.OriginZ
    LEADVector1.AutoRepaint = True


CameraPhi example for Visual Basic

    'move the camera
    LEADVector1.AutoRepaint = False
    LEADVector1.CameraPhi = 20
    LEADVector1.CameraTheta = 30
    LEADVector1.CameraZoom = 200
    LEADVector1.AutoRepaint = True


Click example for Visual Basic

Private Sub LEADVector1_Click()
    MsgBox "control was clicked"
End Sub


ClipboardReady example for Visual Basic

    Dim bRet As Boolean
    LEADVector1.Copy VECTOR_FLAGS_SELECTED_ONLY
    bRet = LEADVector2.ClipboardReady
    If (bRet = True) Then
        LEADVector2.Paste VECTOR_FLAGS_REPLACE
    End If


ClipMode example for Visual Basic

Private Sub Reset_Click()
If (0 = LEADVector1.ClipMode

    LEADVector1.ClipMode = 5
End If
LEADVector1.AntiAliasingDim
LEADVector1.AntiAliasingFilter = 0 'ANTIALIAS_1
LEADVector1.AntiAliasingThreshold = 128

If (LEADVector1.RenderTextAsCurves) Then
    MsgBox "Default text rendering will be used now"
    LEADVector1.RenderTextAsCurves = False
End If
End Sub


ConvertToEMFPicture example for Visual Basic

    Dim nRet As Integer
    nRet = LEADVector1.ConvertFromEMFPicture(Picture3.Picture)

    Picture4.Picture = LEADVector1.ConvertToEMFPicture(0,0,0,0)


ConvertToWMFPicture example for Visual Basic

    Dim nRet As Integer
    nRet = LEADVector1.ConvertFromWMFPicture(Picture1.Picture)

    Picture2.Picture = LEADVector1.ConvertToWMFPicture(0,0,0,0)


CopyFlags example for Visual Basic

    LEADVector2.CopyFlags = VECTOR_FLAGS_SELECTED_ONLY Or VECTOR_FLAGS_REPLACE
    LEADVector2.Vector = LEADVector1.Vector


CopyGroup example for Visual Basic

    Dim NewGroup As LEADVectorGroup
    Dim Index As Long
    Dim nRet As Integer

    Index = LEADVector1.GroupCount
    LEADVector1.ShowNewGroupDlg VECTOR_DLG_AUTOPROCESS
    Set NewGroup = LEADVector1.GetGroupByName(LEADVector1.NewGroupDlgName)
    'copy the group at index 0 to the new group
    nRet = LEADVector1.CopyGroup(Index, LEADVector1.Vector, 0, 0)


CopyLayer example for Visual Basic

    Dim nRet As Integer
    Dim LayerDst As LEADVectorLayer
    Dim LayerSrc As LEADVectorLayer

    Set LayerDst = LEADVector2.GetLayerByIndex(0)
    Set LayerSrc = LEADVector1.GetLayerByIndex(0)

    LayerDst.SetActive
    LayerSrc.SetActive

    'copy all objects from active layer in vector1 to activelayer in vector2
    nRet = LEADVector2.CopyLayer(-1, LEADVector1.Vector, -1, 0)
    If (nRet <> 0) Then
        MsgBox "Can't copy layer!"
    End If


CopyObject example for Visual Basic

    Dim nRet As Integer
    Dim NewLayer As LEADVectorLayer

    'add a new layer for LEADVector2
    LEADVector2.Locked = False
    nRet = LEADVector2.AddLayer("My New Layer", True, False, 0, 0)
    Set NewLayer = LEADVector2.GetLayerByName("My New Layer")
    NewLayer.SetActive
    NewLayer.Visible = True

    'manually copy each selected object from LEADVector1 to LEADVector2
    LEADVector1.EnumObjects VECTOR_FLAGS_SELECTED_ONLY
    Set NewLayer = Nothing

Private Sub LEADVector1_VectorObjects(ByVal pObject As LEADVectorLibCtl.ILEADVectorObject)
    Dim nRet As Integer
    'manual copy each selected object into active layer of LEADVector2
    If (pObject.Selected = True) Then
        nRet = LEADVector2.CopyObject(pObject.hObject, LEADVector1.Vector, -1)
        If (nRet <> 0) Then
            MsgBox "Can't Copy Object!"
        End If
    End If
End Sub


CurrentObject.IsInsideParallelogram example for Visual Basic

Dim x1 As Single
    Dim y1 As Single
    Dim z1 As Single
    Dim x2 As Single
    Dim y2 As Single
    Dim z2 As Single

    x1 = LEADVector1.ObjectParallelogramLeftTopX
    y1 = LEADVector1.ObjectParallelogramLeftTopY
    z1 = LEADVector1.ObjectParallelogramLeftTopZ
    x2 = LEADVector1.ObjectParallelogramRightBottomX
    y2 = LEADVector1.ObjectParallelogramRightBottomY
    z2 = LEADVector1.ObjectParallelogramRightBottomZ

    'select all objects that are in the specified parallelogram
    If (LEADVector1.CurrentObject.IsInsideParallelogram(x1, y1, z1, x2, y2, z2) = True) Then
        LEADVector1.CurrentObject.Selected = True
    End If


CurrentObject.IsInsideRect example for Visual Basic

Private Sub LEADVector1_VectorObjects()
    'select all objects that are in the specified rectangle
    If (LEADVector1.CurrentObject.IsInsideRect(60, 0, 230, 190) = True) Then
        LEADVector1.CurrentObject.Selected = True
    End If
End Sub


DblClick example for Visual Basic

Private Sub LEADVector1_DblClick()
    MsgBox "control was double-clicked"
End Sub


DeleteObjects example for Visual Basic

    'delete selected objects
    LEADVector1.DeleteObjects VECTOR_FLAGS_SELECTED_ONLY


ILEADVectorObject::Delete example for Visual Basic

    LEADVector1.AutoRepaint = False
    'enumerate all objects, and delete selected ones
    LEADVector1.EnumObjects VECTOR_FLAGS_SELECTED_ONLY
    LEADVector1.AutoRepaint = True

Private Sub LEADVector1_VectorObjects(ByVal pObject As LEADVectorLibCtl.ILEADVectorObject)
    'manual delete of all selected objects
    If (pObject.Selected = True) Then
        pObject.Delete
    End If
End Sub


EditLayerDlgActiveLayer example for Visual Basic

    LEADVector1.EditLayerDlgActiveLayer = False
    LEADVector1.ShowEditLayerDlg 0


Empty example for Visual Basic

   If (LEADVector1.IsEmpty = False) Then
      MsgBox "Vector was not empty"
      LEADVector1.Empty
   Else
      MsgBox "Vector was already empty"
   End If


EnableHelp example for Visual Basic

Private Sub HelpEnableContextHelp_Click()
LEADVector1.EnableHelp = True
End Sub

Private Sub HelpEnableDlgHelpButton_Click()
LEADVector1.EnableDlgHelpButton = True
End Sub

Private Sub LEADVector1_Help (ByVal nDlgID As Long, ByVal hElement As Long, ByVal nCtlID As Long)
If (0 = hElement And 0 = nCtlID) Then
    MsgBox "Providing help for the dialog help button[ dialog: " + Str(nDlgID) + "]"
Else
    MsgBox "Providing context sensitive help for the dialog[ dialog: " + Str(nDlgID) + " control: " + Str(nCtlID) + "]"
End If
End Sub


EnableMethodErrors example for Visual Basic

    'disable runtime error exceptions
    LEADVector1.EnableMethodErrors = False
    LEADVector2.EnableMethodErrors = False
    'load a vector
    LEADVector1.Load "s:\temp\images\dxf\test.dxf"
    'copy vector to a 2nd control
    LEADVector2.Vector = LEADVector1.Vector


EnableUndo example for Visual Basic

    LEADVector1.AutoRepaint = False
    LEADVector1.VectorUserMode = VECTOR_USERMODE_AUTO
    LEADVector1.UndoLevel = 10
    LEADVector1.AddUndoNode 0
    LEADVector1.EnableUndo False
    LEADVector1.SetRotation 10, 10, -10, 0, 0, 0, False, VECTOR_ALL_OBJECTS
    LEADVector1.SetTranslation 3, 3, -3, VECTOR_ALL_OBJECTS
    LEADVector1.SetScaling 2, 2, 2, 0, 0, 0, False, VECTOR_ALL_OBJECTS
    LEADVector1.ForceRepaint
    MsgBox "wait"
    LEADVector1.EnableUndo True
    LEADVector1.Undo 0
    LEADVector1.ForceRepaint


EnumGroups example for Visual Basic

    'enum the groups
    LEADVector1.EnumGroups

Private Sub LEADVector1_VectorGroups(ByVal pGroup As LEADVectorLibCtl.ILEADVectorGroup)
    Dim szOut$
    szOut$ = "GroupID=" & CStr(pGroup.ID) & Chr(13) & Chr(10)
    szOut$ = szOut$ & "GroupName=" & pGroup.Name & Chr(13) & Chr(10)
    szOut$ = szOut$ & "GroupTag=" & pGroup.UserTag
    MsgBox szOut$
    'enum each object in the group
    pGroup.EnumObjects 0
End Sub


EnumLayers example for Visual Basic

'enumerate all layers
    LEADVector1.EnumLayers

Private Sub LEADVector1_VectorLayers(ByVal pLayer As LEADVectorLibCtl.ILEADVectorLayer)
    Dim szOut As String
    'display some info about each layer
    szOut = "Layer = " & pLayer.Name & " ID = " & CStr(pLayer.ID) & " Handle = " & _
            CStr(pLayer.ID)
    MsgBox szOut

    pLayer.EnumObjects 0 'enum all objects in this layer
End Sub

Private Sub LEADVector1_VectorObjects(ByVal pObject As LEADVectorLibCtl.ILEADVectorObject)
    Dim szOut As String
    'Display some info about the object
    szOut = "Object ID = " & CStr(pObject.ID) & " In Layer:" & CStr(pObject.Layer) & " Type = " &
CStr(pObject.Type)
    Debug.Print szOut
End Sub


EnumObjects example for Visual Basic

    LEADVector1.AutoRepaint = False
    'enumerate all objects, and select them individually
    LEADVector1.EnumObjects 0
    LEADVector1.AutoRepaint = True

Private Sub LEADVector1_VectorObjects(ByVal pObject As LEADVectorLibCtl.ILEADVectorObject)
    LEADVector1.CurrentObject.Selected = True
End Sub


EnumVertices example for Visual Basic

    'enumerate all vertices in vector image
    List1.Clear
    gVertex = 0
    LEADVector1.StopEnum = False
    LEADVector1.EnumVertices 0

Private Sub LEADVector1_VectorVertices(ByVal X As Double, ByVal Y As Double, ByVal Z As Double)
    Dim out$

    out$ = CStr(X) & " - " & CStr(Y) & " - " & CStr(Z)
    List1.AddItem out$
    'stop after the 100th vertex
    gVertex = gVertex + 1
    If gVertex > 100 Then
        LEADVector1.StopEnum = True
    End If
End Sub


ExplodeObjects example for Visual Basic

    'explode all objects
    LEADVector1.ExplodeObjects 0


FontMapper example for Visual Basic

Private Sub LEADVector1_FontMapperResizeEvent()
'Set font size to 9
LEADVector1.SubstitutedFont.Size = 9
End Sub


GetActiveLayer example for Visual Basic

    Dim ActiveLayer As LEADVectorLayer
    Set ActiveLayer = LEADVector1.GetActiveLayer()
    Set ActiveLayer = Nothing


GetGroupByIndex example for Visual Basic

    Dim NewGroup As LEADVectorGroup
    Dim x As Long
    'enum all objects in each group
    If (LEADVector1.GroupCount > 0) Then
        For x = 0 To LEADVector1.GroupCount - 1
            Set NewGroup = LEADVector1.GetGroupByIndex(0)
            NewGroup.EnumObjects 0
            Set NewGroup = Nothing
        Next x
    End If


GetLayerByIndex example for Visual Basic

Dim Layer As LEADVectorLayer
    Set Layer = LEADVector1.GetLayerByIndex(0)
    'lock layer 0
    Layer.Locked = True
    'enumerate all layers
    LEADVector1.EnumLayers

Private Sub LEADVector1_VectorLayers(ByVal pLayer As LEADVectorLibCtl.ILEADVectorLayer)
    'empty out all visible layers that are not locked
    If ((pLayer.Visible = True) And (pLayer.Locked <> True)) Then
        pLayer.Empty
    End If
End Sub


GetObjectsParallelogram example for Visual Basic

    Dim out$

    List1.Clear
    If (LEADVector1.IsAnObjectSelected = True) Then
        LEADVector1.GetObjectsParallelogram VECTOR_SELECTED_OBJECTS
    Else
        LEADVector1.GetObjectsParallelogram VECTOR_ALL_OBJECTS
    End If
    out$ = "LeftTopX: " & CStr(LEADVector1.ObjectParallelogramLeftTopX)
    List1.AddItem out$
    out$ = "LeftTopY: " & CStr(LEADVector1.ObjectParallelogramLeftTopY)
    List1.AddItem out$
    out$ = "LeftTopZ: " & CStr(LEADVector1.ObjectParallelogramLeftTopZ)
    List1.AddItem out$
    out$ = "RightBottomX: " & CStr(LEADVector1.ObjectParallelogramRightBottomX)
    List1.AddItem out$
    out$ = "RightBottomY: " & CStr(LEADVector1.ObjectParallelogramRightBottomY)
    List1.AddItem out$
    out$ = "RightBottomZ: " & CStr(LEADVector1.ObjectParallelogramRightBottomZ)
    List1.AddItem out$


GetObjectsRect example for Visual Basic

    Dim out$

    List1.Clear
    If (LEADVector1.IsAnObjectSelected = True) Then
        LEADVector1.GetObjectsRect VECTOR_SELECTED_OBJECTS
    Else
        LEADVector1.GetObjectsRect VECTOR_ALL_OBJECTS
    End If
    out$ = "Left: " & CStr(LEADVector1.ObjectRectLeft)
    List1.AddItem out$
    out$ = "Top: " & CStr(LEADVector1.ObjectRectTop)
    List1.AddItem out$
    out$ = "Width: " & CStr(LEADVector1.ObjectRectWidth)
    List1.AddItem out$
    out$ = "Height: " & CStr(LEADVector1.ObjectRectHeight)
    List1.AddItem out$


ScaleMode example for Visual Basic
GetObjectsRect example for Visual Basic

Dim out$

    List1.Clear
    If (LEADVector1.IsAnObjectSelected = True) Then
        LEADVector1.GetObjectsRect VECTOR_SELECTED_OBJECTS
    Else
        LEADVector1.GetObjectsRect VECTOR_ALL_OBJECTS
    End If
    out$ = "Left: " & CStr(LEADVector1.ObjectRectLeft)
    List1.AddItem out$
    out$ = "Top: " & CStr(LEADVector1.ObjectRectTop)
    List1.AddItem out$
    out$ = "Width: " & CStr(LEADVector1.ObjectRectWidth)
    List1.AddItem out$
    out$ = "Height: " & CStr(LEADVector1.ObjectRectHeight)
    List1.AddItem out$


HitTestDistance example for Visual Basic

    LEADVector1.HitTestDistance = 5
    LEADVector1.HitTestFlags = VECTOR_HITTEST_IGNORESELECTED


HitTestDlgFlags example for Visual Basic

    LEADVector1.HitTestDlgDistance = LEADVector1.HitTestDistance
    LEADVector1.HitTestDlgFlags = LEADVector1.HitTestFlags
    LEADVector1.ShowHitTestDlg VECTOR_DLG_AUTOPROCESS


ILEADVectorGroup::Delete example for Visual Basic

    Dim TheGroup As LEADVectorGroup
    'delete the first group and all of it's clones
    If (LEADVector1.GroupCount > 0) Then
        Set TheGroup = LEADVector1.GetGroupByIndex(0)
        TheGroup.DeleteClones 0
        TheGroup.Delete
    End If


ILEADVectorGroup::Empty example for Visual Basic

    'empty all objects from all groups
    Dim Group As LEADVectorGroup
    Dim X As Long
    If (LEADVector1.GroupCount > 0) Then
        For X = 0 To LEADVector1.GroupCount - 1
            Set Group = LEADVector1.GetGroupByIndex(0)
            Group.Empty
            Set Group = Nothing
        Next X
    End If


ILEADVectorLayer::Delete example for Visual Basic

    Dim ActiveLayer As LEADVectorLayer
    Set ActiveLayer = LEADVector1.GetActiveLayer
    ActiveLayer.Delete


ILEADVectorObject::Bitmap example for Visual Basic

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_RASTER)
    NewObject.UserTag = 99 'set a user tag
    NewObject.X(0) = 3#
    NewObject.Y(0) = 3#
    NewObject.Z(0) = 0#

    NewObject.X(1) = 1#
    NewObject.Y(1) = 1#
    NewObject.Z(1) = 0#

    NewObject.Bitmap = LEAD1.Bitmap

    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If


ILEADVectorObject::BrushStyle example for Visual Basic

Private Sub SetPenProperties (ByVal EnableExtendedPen As Boolean, ByVal VectorBrushStyle As VectorBrushStyles)
Dim nRet As Integer
Dim NewObject As LEADVectorObject
Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_ELLIPSE)
    NewObject.UserTag = 99 'set a user tag
    NewObject.X(0) = 1#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 1#

If (EnableExtendedPen) Then
  NewObject.EnableExtendedPen = True
  NewObject.ExtendedLogicalPenStyle = PS_SOLID Or PS_ENDCAP_FLAT Or   PS_JOIN_BEVEL
  NewObject.ExtendedLogicalPenWidth = 2
  NewObject.ExtendedLogicalPenBrushStyle = BS_SOLID
  NewObject.ExtendedLogicalPenColor = vbRed
  NewObject.ExtendedLogicalPenHatch = 0
  NewObject.ExtendedLogicalPenEntriesNumber = 0
Else
    NewObject.EnableExtendedPen = False
    NewObject.PenColor = vbRed
    NewObject.PenStyle = VECTOR_PS_SOLID
    NewObject.PenWidth = 5
End If
Select Case VectorBrushStyle
   case VECTOR_BRUSH_STANDARD
      NewObject.BrushStyle = VECTOR_BRUSH_STANDARD ILTVectorAutomation
      NewObject.StandardBrushColorILTVectorAutomation = vbRed
      NewObject.StandardBrushStyle = VECTOR_BS_HATCHED
      NewObject.StandardBrushHatch = VECTOR_HS_HORIZONTAL
   case VECTOR_BRUSH_HATCH
      NewObject.BrushStyleILTVectorAutomation====    = VECTOR_BRUSH_HATCH
      NewObject.HatchBrushStyleILTVectorAutomation = HATCH_LINE
      NewObject.HatchBrushPenColor = vbRed
      NewObject.HatchBrushPenStyle = VECTOR_PS_DASH
      NewObject.HatchBrushPenWidth = 1
      NewObject.HatchBrushBrushStyle = VECTOR_BS_SOLID
      NewObject.HatchBrushBrushColor = vbGreen
   case VECTOR_BRUSH_PATTERN
      NewObject.BrushStyleILTVectorAutomation = VECTOR_BRUSH_PATTERN
      NewObject.PatternBrushBitmapILTVectorAutomation = LEAD1.Bitmap
   case VECTOR_BRUSH_GRADIENT

      NewObject.BrushStyleILTVectorAutomation = VECTOR_BRUSH_GRADIENT
      NewObject.GradeintBrushStartColor = vbBlack

      NewObject.GradeintBrushEndColor = vbYellow
      NewObject.GradientBrushSteps = 30ILTVectorAutomation=
      NewObject.GradientBrushStyle = VECTOR_GRADIENT_LINE_L_TO_R
    End Select
    NewObject.RadiusX = 1
    NewObject.RadiusY = 1
    Set NewLayer = LEADVector1.GetLayerByNameGetLayerByNamemethod("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If

End Sub


ILEADVectorObject::SectionsNumber example for Visual Basic

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject( VECTOR_HPOLYBEZIER)
    NewObject.UserTag = 99 'set a user tag
    NewObject.SectionsNumber = 1

    NewObject.Degree(0)= 2

    NewObject.X(0) = 1#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 1#

    NewObject.X(1) = 100#
    NewObject.Y(1) = 1#
    NewObject.Z(1) = 1#

    NewObject.X(2) = 100#
    NewObject.Y(2) = 100#
    NewObject.Z(2) = 1#
    NewObject.EnableExtendedPen = False

    NewObject.LogicalPenColor = vbRed
    NewObject.LogicalPenStyle = VECTOR_PS_SOLID
    NewObject.LogicalPenWidth = 5
    NewObject.BrushStyle = VECTOR_BRUSH_STANDARD

    NewObject.StandardBrushStyle = VECTOR_BS_HATCHED
    NewObject.StandardBrushColor = vbBlue
    NewObject.StandardBrushHatch = VECTOR_HS_HORIZONTAL
    NewObject.RadiusX = 1
    NewObject.RadiusY = 1
    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If


ILEADVectorObject::DllName example for Visual Basic

Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer
    Dim hDLL As Long

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_STOCK)
    NewObject.ROP = VECTOR_R2_NOTCOPYPEN
    NewObject.UserTag = 99 'set a user tag
    NewObject.X(0) = 3#
    NewObject.Y(0) = 3#
    NewObject.Z(0) = 0#
    NewObject.X(1) = 1#
    NewObject.Y(1) = 1#
    NewObject.Z(1) = 0#

    NewObject.PenColor = vbRed
    NewObject.PenStyle = VECTOR_PS_SOLID
    NewObject.PenWidth = 1

    NewObject.BrushColor = vbGreen
    NewObject.BrushStyle = VECTOR_BS_SOLID
    NewObject.BrushHatch = 0

    hDLL = LoadLibrary("vecofice.dll")

    NewObject.hDllInst = hDLL
    NewObject.DllName = "" 'use the dll instance instead of the name
    NewObject.StockID = 15

    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If


ILEADVectorObject::Explode example for Visual Basic

LEADVector1.AutoRepaint = False
    'enumerate all objects, and explode them individually
    LEADVector1.EnumObjects 0
    LEADVector1.AutoRepaint = True

Private Sub LEADVector1_VectorObjects(ByVal pObject As LEADVectorLibCtl.ILEADVectorObject)
   'Manually explode each object
   pObject.Explode
End Sub


ILEADVectorObject::Flags example for Visual Basic

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_TEXT)
    NewObject.UserTag = 99 'set a user tag
    NewObject.X(0) = 1#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 0#

    NewObject.PenColor = vbRed
    NewObject.PenStyle = VECTOR_PS_SOLID
    NewObject.PenWidth = 5

    NewObject.Text = "LEADTOOLS!"
    NewObject.Flags = VECTOR_TEXT_HCENTER Or VECTOR_TEXT_VCENTER
    NewObject.CharHeight = 8
    NewObject.CharWidth = 8
    NewObject.FontHeight = 0
    NewObject.FontWidth = 0
    NewObject.FontOrientation = 450
    NewObject.FontEscapement = 450
    NewObject.FontUnderline = True
    NewObject.FontItalic = True
    NewObject.FontStrikeOut = True
    NewObject.FontFaceName = "Arial"
    NewObject.FontPitchAndFamily = 0
    NewObject.FontQuality = 0
    NewObject.FontClipPrecision = 0
    NewObject.FontOutPrecision = 0
    NewObject.FontCharSet = 0

    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If


ILEADVectorObject::Hidden example for Visual Basic

Private Sub LEADVector1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
    Dim bRet As Boolean

    bRet = LEADVector1.HitTest(x, y)
    If (bRet = True) Then
        LEADVector1.CurrentObject.Hidden = True
        LEADVector1.ForceRepaint
    End If
End Sub


ILEADVectorObject::PointCount example for Visual Basic

Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_POLYGON)
    NewObject.UserTag = 99 'set a user tag
    NewObject.PointCount = 3
    NewObject.X(0) = 1#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 0#

    NewObject.X(1) = 4#
    NewObject.Y(1) = 1#
    NewObject.Z(1) = 0#

    NewObject.X(2) = 0#
    NewObject.Y(2) = 0#
    NewObject.Z(2) = 0#

    NewObject.PolyFillMode = VECTOR_POLY_WINDING

    NewObject.PenColor = vbRed
    NewObject.PenStyle = VECTOR_PS_SOLID
    NewObject.PenWidth = 5
    NewObject.BrushStyle = VECTOR_BS_HATCHED
    NewObject.BrushColor = vbBlue
    NewObject.BrushHatch = VECTOR_HS_HORIZONTAL
    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If


ILEADVectorObject::PointType example for Visual Basic

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_POLYDRAW)
    NewObject.UserTag = 99 'set a user tag
    NewObject.PointCount = 4
    NewObject.X(0) = 1#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 0#
    NewObject.PointType(0) = VECTOR_PT_MOVETO

    NewObject.X(1) = 4#
    NewObject.Y(1) = 1#
    NewObject.Z(1) = 0#
    NewObject.PointType(1) = VECTOR_PT_LINETO

    NewObject.X(2) = 4#
    NewObject.Y(2) = 3#
    NewObject.Z(2) = 0#
    NewObject.PointType(2) = VECTOR_PT_LINETO

    NewObject.X(3) = 3#
    NewObject.Y(3) = 5#
    NewObject.Z(3) = 0#
    NewObject.PointType(3) = VECTOR_PT_LINETO

    NewObject.PenColor = vbRed
    NewObject.PenStyle = VECTOR_PS_SOLID
    NewObject.PenWidth = 5

    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If


ILEADVectorObject::StartAngle example for Visual Basic

    Dim nRet As Integer
    Dim NewObject As LEADVectorObject
    Dim NewLayer As LEADVectorLayer

    nRet = LEADVector1.AddLayer("My Layer", True, False, 0, 0)
    If (nRet <> 0) Then
        MsgBox "Can't Add Layer!"
    End If
    'add a new object
    Set NewObject = LEADVector1.AddNewObject(VECTOR_PIE)
    NewObject.UserTag = 99 'set a user tag
    NewObject.X(0) = 1#
    NewObject.Y(0) = 1#
    NewObject.Z(0) = 1#
    NewObject.PenColor = vbRed
    NewObject.PenStyle = VECTOR_PS_SOLID
    NewObject.PenWidth = 5
    NewObject.BrushStyle = VECTOR_BS_HATCHED
    NewObject.BrushColor = vbBlue
    NewObject.BrushHatch = VECTOR_HS_HORIZONTAL
    NewObject.RadiusX = 1
    NewObject.StartAngle = 45
    NewObject.SweepAngle = 45
    Set NewLayer = LEADVector1.GetLayerByName("My Layer")
    nRet = NewObject.Insert(NewLayer.ID)
    If (nRet <> 0) Then
        MsgBox "Can't Insert Object!"
    End If


ILTVectorAutomation::CurrentTool example for Visual Basic

    LEADVector1.AutomationProps.CurrentTool = BUTTON_ID_TOOL_VECTOR_LINE
    MsgBox CStr(LEADVector1.AutomationProps.CurrentTool)


InvertColors example for Visual Basic

Private Sub OptionsInvertColors_Click()
    LEADVector1.InvertColors
End Sub


Is3D example for Visual Basic

    If (LEADVector1.Is3D = True) Then
        MsgBox "Vector is 3D"
    End If
    'free it
    LEADVector1.Free


IsAnObjectHidden example for Visual Basic

If( LEADVector1.IsAnObjectHidden = True ) Then
    MsgBox "Some objects are hidden"
Else
    MsgBox "No objects is hidden"
End If


IsObjectsInsideRect example for Visual Basic

    Dim bRet As Boolean
    bRet = LEADVector1.IsObjectsInsideRect(0, 0, 500, 500, 0)
    If (bRet = True) Then
        MsgBox "Yes"
    End If


IsObjectsInsideParallelogram example for Visual Basic

    Dim bRet As Boolean
    'are there any selected items inside the parallelogram?
    bRet = LEADVector1.IsObjectsInsideParallelogram(-50, -50, -50, 50, 50, 50, VECTOR_FLAGS_SELECTED_ONLY)
    If (bRet = True) Then
        MsgBox "Yes"
    End If


KeyDown example for Visual Basic

Private Sub LEADVector1_KeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer)
    MsgBox "KeyDown"
End Sub


KeyPress example for Visual Basic

Private Sub LEADVector1_KeyPress(ByVal KeyAscii As Integer)
    MsgBox "KeyPress"
End Sub


KeyUp example for Visual Basic

Private Sub LEADVector1_KeyUp(ByVal KeyCode As Integer, ByVal Shift As Integer)
    MsgBox "KeyUp"
End Sub


LayerCount example for Visual Basic

    MsgBox "Layers = " & CStr(LEADVector1.LayerCount)


Load example for Visual Basic

    Dim nRet As Integer
    'load a vector image
    LEADVector1.BackColor = RGB(0, 0, 0)
    LEADVector1.BackErase = True
    LEADVector1.AutoRepaint = False
    nRet = LEADVector1.Load("s:\temp\images\dxf\test.dxf")
    If (nRet <> 0) Then
        MsgBox "Error # " & CStr(nRet)
    Else
        LEADVector1.ForceRepaint
        LEADVector1.AutoRepaint = True
    End If


LoadMemory example for Visual Basic

Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long

    Dim hMem     As Long
    Dim iSize    As Long

    If LEADVector1.SaveMemory(hMem, FILE_DXF, iSize) <> 0 Then
        MsgBox ("Error calling SaveMemory")
    Else
        LEADVector1.Free
        MsgBox "wait"
        If LEADVector1.LoadMemory(hMem, iSize) <> 0 Then
            MsgBox ("Error calling LoadMemory")
        End If
        'free the memory
        GlobalFree (hMem)
    End If


Locked example for Visual Basic

    'Check if locked
    If (LEADVector1.Locked = True) Then
        MsgBox "Vector was locked"
        LEADVector1.Locked = False
    Else
        MsgBox "Vector was not locked"
        LEADVector1.Locked = True
    End If


LogicalToPhysical example for Visual Basic

    'convert from logical to physcial
    LEADVector1.LogicalToPhysical -2.2, 3.1, -3.2
    MsgBox "X: " & CStr(LEADVector1.PhysicalX) & " Y: " & CStr(LEADVector1.PhysicalY)


MarkerPenStyle example for Visual Basic

    LEADVector1.MarkerPenStyle = MARKER_PS_DASHDOTDOT
    LEADVector1.MarkerPenWidth = 1
    LEADVector1.MarkerPenColor = vbRed
    LEADVector1.MarkerBrushStyle = MARKER_BS_HATCHED
    LEADVector1.MarkerBrushColor = vbBlue
    LEADVector1.MarkerBrushHatch = MARKER_HS_VERTICAL


MouseDown example for Visual Basic

Private Sub LEADVector1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
    Caption = "MouseDown"
End Sub

Private Sub LEADVector1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
    Caption = "X: " & CStr(x) & " - Y: " & CStr(y)
End Sub


MousePointer example for Visual Basic

LEADImgList1.MousePointer = 99
LEADImgList1.MouseIcon = LoadPicture("d:\temp\eye.ico")


MouseUp example for Visual Basic

Private Sub LEADVector1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
    Dim bRet As Boolean

    bRet = LEADVector1.HitTest(x, y)
    If (bRet = True) Then
        LEADVector1.CurrentObject.Selected = True
        LEADVector1.ForceRepaint
    End If
End Sub


NewLayerDlgName example for Visual Basic

    MsgBox CStr(LEADVector1.LayerCount)
    LEADVector1.NewLayerDlgName = "TestLayer"
    LEADVector1.NewLayerDlgVisible = True
    LEADVector1.NewLayerDlgLocked = False
    LEADVector1.NewLayerDlgUserTag = 100
    LEADVector1.NewLayerDlgActiveLayer = True
    LEADVector1.ShowNewLayerDlg VECTOR_DLG_AUTOPROCESS
    MsgBox CStr(LEADVector1.LayerCount)


ObjectParallelogramLeft example for Visual Basic

Dim out$

    List1.Clear
    If (LEADVector1.IsAnObjectSelected = True) Then
        LEADVector1.GetObjectsParallelogram VECTOR_SELECTED_OBJECTS
    Else
        LEADVector1.GetObjectsParallelogram VECTOR_ALL_OBJECTS
    End If
    out$ = "LeftTopX: " & CStr(LEADVector1.ObjectParallelogramLeftTopX)
    List1.AddItem out$
    out$ = "LeftTopY: " & CStr(LEADVector1.ObjectParallelogramLeftTopY)
    List1.AddItem out$
    out$ = "LeftTopZ: " & CStr(LEADVector1.ObjectParallelogramLeftTopZ)
    List1.AddItem out$
    out$ = "RightBottomX: " & CStr(LEADVector1.ObjectParallelogramRightBottomX)
    List1.AddItem out$
    out$ = "RightBottomY: " & CStr(LEADVector1.ObjectParallelogramRightBottomY)
    List1.AddItem out$
    out$ = "RightBottomZ: " & CStr(LEADVector1.ObjectParallelogramRightBottomZ)
    List1.AddItem out$


PanX example for Visual Basic

   'pan image down and right
   LEADVector1.AutoScroll = FALSE
    LEADVector1.PanX = LEADVector1.PanX - 10
    LEADVector1.PanY = LEADVector1.PanY - 10


ParallelogramMinX example for Visual Basic

    Dim szOut As String

    szOut = "MinX = " & CStr(LEADVector1.ParallelogramMinX) & Chr(10) & Chr(13)
    szOut = szOut & "MinY = " & CStr(LEADVector1.ParallelogramMinY) & Chr(10) & Chr(13)
    szOut = szOut & "MinZ = " & CStr(LEADVector1.ParallelogramMinZ) & Chr(10) & Chr(13)

    szOut = szOut & "MaxX = " & CStr(LEADVector1.ParallelogramMaxX) & Chr(10) & Chr(13)
    szOut = szOut & "MaxY = " & CStr(LEADVector1.ParallelogramMaxY ) & Chr(10) & Chr(13)
    szOut = szOut & "MaxZ = " & CStr(LEADVector1.ParallelogramMaxZ )

    MsgBox szOut, vbOKOnly, "Parallelogram"

    LEADVector1.ParallelogramMinX = 0
    LEADVector1.ParallelogramMinY = 0
    LEADVector1.ParallelogramMinZ = 0
    LEADVector1.ParallelogramMaxX = 100
    LEADVector1.ParallelogramMaxY = 100
    LEADVector1.ParallelogramMaxZ = 100

    szOut = "MinX = " & CStr(LEADVector1.ParallelogramMinX) & Chr(10) & Chr(13)
    szOut = szOut & "MinY = " & CStr(LEADVector1.ParallelogramMinY) & Chr(10) & Chr(13)
    szOut = szOut & "MinZ = " & CStr(LEADVector1.ParallelogramMinZ) & Chr(10) & Chr(13)

    szOut = szOut & "MaxX = " & CStr(LEADVector1.ParallelogramMaxX) & Chr(10) & Chr(13)
    szOut = szOut & "MaxY = " & CStr(LEADVector1.ParallelogramMaxY) & Chr(10) & Chr(13)
    szOut = szOut & "MaxZ = " & CStr(LEADVector1.ParallelogramMaxZ)

    MsgBox szOut, vbOKOnly, "Parallelogram"


PhysicalToLogical example for Visual Basic

Private Sub LEADVector1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Double, ByVal y As Double)
    Dim szOut As String
    LEADVector1.PhysicalToLogical x, y
    szOut = "(" & CStr(LEADVector1.LogicalX) & "," & CStr(LEADVector1.LogicalY) & ")"
    Debug.Print szOut
End Sub


Polygon example for Visual Basic
PolygonMode example for Visual Basic

    'show all polygon modes
    LEADVector1.PolygonMode = VECTOR_POLYGON_POINT
    MsgBox "wait"
    LEADVector1.PolygonMode = VECTOR_POLYGON_LINE
    MsgBox "wait"
    LEADVector1.PolygonMode = VECTOR_POLYGON_FILL
    MsgBox "wait"


PreferredLoadFormat Example for Visual Basic

LEADVector1.PreferredLoadFormat = FILE_DXF


Realize example for Visual Basic

    'create canvas bitmap
    LEAD1.CreateBitmap 400, 400, 24
    LEAD1.Fill LEADVector1.BackColor
    'realize the vector to the bitmap
    LEADVector1.Realize LEAD1.Bitmap, True


Redo example for Visual Basic

    If (LEADVector1.CanRedo () = True) Then
        LEADVector1.Redo 0
    End If


Render example for Visual Basic

    Dim hDC As Long
    Dim nWidth As Long
    Dim nHeight As Long
        nWidth = Printer.Width / Printer.TwipsPerPixelX
        nHeight = Printer.Height / Printer.TwipsPerPixelY
        hDC = LEADVector1.PrintStart
        'you can specify the location and size
        LEADVector1.Render hDC, 100, 100, nWidth / 4, nHeight / 4
        LEADVector1.PrintEnd hDC


RenderDlgUseLights example for Visual Basic

    LEADVector1.RenderDlgAmbientColor = LEADVector1.AmbientColor
    LEADVector1.RenderDlgPolygonMode = LEADVector1.PolygonMode
    LEADVector1.RenderDlgUseLights = LEADVector1.UseLights
    LEADVector1.ShowRenderDlg VECTOR_DLG_AUTOPROCESS Or VECTOR_DLG_SHOWPREVIEW


Reset example for Visual Basic

   'Reset the vector
   LEADVector1.Reset VECTOR_RESET_ALL


Resize example for Visual Basic

Private Sub LEADVector1_Resize()
    MsgBox "Resize event"
End Sub


RotationDlgOriginX example for Visual Basic

    List1.Clear
    LEADVector1.RotationDlgOriginX = LEADVector1.OriginX
    LEADVector1.RotationDlgOriginY = LEADVector1.OriginY
    LEADVector1.RotationDlgOriginZ = LEADVector1.OriginZ
    LEADVector1.ShowRotateDlg VECTOR_DLG_AUTOPROCESS + VECTOR_DLG_SHOWPREVIEW
    List1.AddItem CStr(LEADVector1.RotationDlgX)
    List1.AddItem CStr(LEADVector1.RotationDlgY)
    List1.AddItem CStr(LEADVector1.RotationDlgZ)
    List1.AddItem CStr(LEADVector1.RotationDlgOriginX)
    List1.AddItem CStr(LEADVector1.RotationDlgOriginY)
    List1.AddItem CStr(LEADVector1.RotationDlgOriginZ)


Save example for Visual Basic

    'save a DXF file
    LEADVector1.ApplyTransformation
    LEADVector1.Save "d:\temp\testing.dxf", FILE_DXF
    LEADVector1.Free
    MsgBox "wait"
    LEADVector1.Load "d:\temp\testing.dxf"


SaveArray example for Visual Basic

Dim varSave
    Dim lSize As Long

    varSave = LEADVector1.SaveArray(FILE_DXF)
    lSize = LEADVector1.ArraySize(varSave)

    If (lSize > 0) Then
        LEADVector1.Free
        MsgBox "wait"
        If LEADVector1.LoadArray(varSave, lSize) <> 0 Then
            MsgBox ("Error calling LoadArray")
        End If
    Else
        MsgBox "Error calling SaveArray"
    End If


ScaleDlgOriginX example for Visual Basic

    List1.Clear
    LEADVector1.ScaleDlgOriginX = LEADVector1.OriginX
    LEADVector1.ScaleDlgOriginY = LEADVector1.OriginY
    LEADVector1.ScaleDlgOriginZ = LEADVector1.OriginZ
    LEADVector1.ShowScaleDlg VECTOR_DLG_AUTOPROCESS + VECTOR_DLG_SHOWPREVIEW
    List1.AddItem CStr(LEADVector1.ScaleDlgX)
    List1.AddItem CStr(LEADVector1.ScaleDlgY)
    List1.AddItem CStr(LEADVector1.ScaleDlgZ)
    List1.AddItem CStr(LEADVector1.ScaleDlgOriginX)
    List1.AddItem CStr(LEADVector1.ScaleDlgOriginY)
    List1.AddItem CStr(LEADVector1.ScaleDlgOriginZ)


ScaleHeight example for Visual Basic

ScaleHeight has been removed.


SelectAllObjects example for Visual Basic

    'select all objects
    LEADVector1.SelectAllObjects True
    MsgBox "wait"
    If (LEADVector1.IsAnObjectSelected = True) Then
        'deselect all objects
        LEADVector1.SelectAllObjects False
    End If


SetDlgString example for Visual Basic

Dim Title$

    Title$ = LEADVector1.GetDlgString (VECTOR_DLGSTRING_TRANSFORM_SCALE_CAPTION)
    MsgBox "OldValue: " & Title$

    'set some custom strings
    LEADVector1.SetDlgString VECTOR_DLGSTRING_TRANSFORM_SCALE_CAPTION, "My Custom Title"


SetRotation example for Visual Basic

    Dim out$
    out$ = "Before: X=" & CStr(LEADVector1.RotationX)
    out$ = out$ & " Y=" & CStr(LEADVector1.RotationY)
    out$ = out$ & " Z=" & CStr(LEADVector1.RotationZ)
    MsgBox out$
    LEADVector1.AutoRepaint = True
    LEADVector1.SetRotation 10, 10, -10, 0, 0, 0, False, VECTOR_ALL_OBJECTS
    out$ = "After: X=" & CStr(LEADVector1.RotationX)
    out$ = out$ & " Y=" & CStr(LEADVector1.RotationY)
    out$ = out$ & " Z=" & CStr(LEADVector1.RotationZ)
    MsgBox out$


SetScaling example for Visual Basic

    Dim out$
    out$ = "Before: X=" & CStr(LEADVector1.ScalingX)
    out$ = out$ & " Y=" & CStr(LEADVector1.ScalingY)
    out$ = out$ & " Z=" & CStr(LEADVector1.ScalingZ)
    MsgBox out$
    LEADVector1.AutoRepaint = True
    LEADVector1.SetScaling 2, 2, 2, 0, 0, 0, False, VECTOR_ALL_OBJECTS
    out$ = "After: X=" & CStr(LEADVector1.ScalingX)
    out$ = out$ & " Y=" & CStr(LEADVector1.ScalingY)
    out$ = out$ & " Z=" & CStr(LEADVector1.ScalingZ)
    MsgBox out$


SetTranslation example for Visual Basic

Dim out$
    out$ = "Before: X=" & CStr(LEADVector1.TranslationX)
    out$ = out$ & " Y=" & CStr(LEADVector1.TranslationY)
    out$ = out$ & " Z=" & CStr(LEADVector1.TranslationZ)
    MsgBox out$
    LEADVector1.AutoRepaint = True
    LEADVector1.SetTranslation 3, 3, -3, VECTOR_ALL_OBJECTS
    out$ = "After: X=" & CStr(LEADVector1.TranslationX)
    out$ = out$ & " Y=" & CStr(LEADVector1.TranslationY)
    out$ = out$ & " Z=" & CStr(LEADVector1.TranslationZ)
    MsgBox out$


Show3DOptionsDlg example for Visual Basic

    List1.Clear
    LEADVector1.Show3DOptionsDlg VECTOR_DLG_AUTOPROCESS + VECTOR_DLG_SHOWPREVIEW
    List1.AddItem CStr(LEADVector1.Dlg3DOptionsUseLights)
    List1.AddItem CStr(LEADVector1.Dlg3DOptionsAmbientColor)
    List1.AddItem CStr(LEADVector1.Dlg3DOptionsPolygonMode)


ShowCameraDlg example for Visual Basic

    List1.Clear
    LEADVector1.ShowCameraDlg VECTOR_DLG_AUTOPROCESS + VECTOR_DLG_SHOWPREVIEW
    List1.AddItem CStr(LEADVector1.CameraDlgTheta)
    List1.AddItem CStr(LEADVector1.CameraDlgPhi)
    List1.AddItem CStr(LEADVector1.CameraDlgZoom)


ShowEditAllGroupsDlg example for Visual Basic

    'edit all the groups
    LEADVector1.ShowEditAllGroupsDlg VECTOR_DLG_AUTOPROCESS


ShowEditAllLayersDlg example for Visual Basic

    LEADVector1.ShowEditAllLayersDlg 0


ShowEditGroupDlg example for Visual Basic

    Dim x As Long
    Dim TheGroup As LEADVectorGroup
    'edit each group
    For x = 0 To LEADVector1.GroupCount - 1
        Set TheGroup = LEADVector1.GetGroupByIndex(x)
        MsgBox "Group Index " & CStr(x) & " before: " & TheGroup.Name
        Set TheGroup = Nothing
        LEADVector1.ShowEditGroupDlg x
        Set TheGroup = LEADVector1.GetGroupByIndex(x)
        MsgBox "Group Index " & CStr(x) & " after: " & TheGroup.Name
        Set TheGroup = Nothing
    Next x


ShowEditObjectDlg example for Visual Basic

Private Sub LEADVector1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Double, ByVal Y As Double)
    Dim bRet As Boolean
    bRet = LEADVector1.HitTest(X, Y)
    If (bRet) Then
        LEADVector1.ShowEditObjectDlg LEADVector1.CurrentObject.hObject
    End If
End Sub


ShowNewObjectDlg example for Visual Basic

    LEADVector1.ShowNewObjectDlg VECTOR_PIE, -1


ShowRotateDlg example for Visual Basic

    List1.Clear
    LEADVector1.ShowRotateDlg VECTOR_DLG_AUTOPROCESS + VECTOR_DLG_SHOWPREVIEW
    List1.AddItem CStr(LEADVector1.RotationDlgX)
    List1.AddItem CStr(LEADVector1.RotationDlgY)
    List1.AddItem CStr(LEADVector1.RotationDlgZ)


ShowScaleDlg example for Visual Basic

   List1.Clear
    LEADVector1.ShowScaleDlg VECTOR_DLG_AUTOPROCESS + VECTOR_DLG_SHOWPREVIEW
    List1.AddItem CStr(LEADVector1.ScaleDlgX)
    List1.AddItem CStr(LEADVector1.ScaleDlgY)
    List1.AddItem CStr(LEADVector1.ScaleDlgZ)


ShowTranslateDlg example for Visual Basic

    List1.Clear
    LEADVector1.ShowTranslateDlg VECTOR_DLG_AUTOPROCESS + VECTOR_DLG_SHOWPREVIEW
    List1.AddItem CStr(LEADVector1.TranslateDlgX)
    List1.AddItem CStr(LEADVector1.TranslateDlgY)
    List1.AddItem CStr(LEADVector1.TranslateDlgZ)


StartFeedLoad example for Visual Basic

Dim nRet As Integer
   ' Declare a buffer that you will use to feed the file-load process.
   Const BUFFERSIZE = 60000
   Dim MyArray(0 To BUFFERSIZE - 1) As Byte ' index the array starting with 0
   ' Declare other local variables.
   Dim BytesRead As Long
   Dim FileLength As Long
   ' Open an image file and get its length.
   Open "s:\temp\images\dxf\test.dxf" For Binary Access Read As #1
   FileLength = LOF(1)

   ' Initialize the file-load process.
   If LEADVector1.StartFeedLoad() <> 0 Then
      MsgBox ("Error in StartFeedLoad !")
      GoTo quit_function
   End If
   ' Use FeedLoad in a loop to load the file into the bitmap.
   Do
      Get #1, , MyArray        ' read from the file
      If FileLength > BUFFERSIZE Then
         BytesRead = BUFFERSIZE
      Else
         BytesRead = FileLength
      End If

      FileLength = FileLength - BytesRead
      If LEADVector1.FeedLoad(MyArray, BytesRead) <> 0 Then
         MsgBox ("Error in FeedLoad !")
         GoTo quit_function
      End If
   Loop Until FileLength <= 0
   ' Finish the file-load process.
   nRet = LEADVector1.StopFeedLoad()
   If nRet <> 0 Then
      MsgBox ("Error in StopFeedLoad !")
      GoTo quit_function
   End If
quit_function:
   ' Close the file.
   Close #1


ToolbarControl example for Visual Basic

Private Sub LEADVector1_GotFocus()
    If (LEADVector1.VectorUserMode = VECTOR_USERMODE_AUTO) Then
        LEADVector1.AutoContainer.SetActive 'set active container
        LEADVector1.ToolbarControl = LEADToolBar1 'set toolbar
    End If
End Sub

Private Sub LEADVector1_LostFocus()
    LEADVector1.ToolbarControl = Nothing 'release toolbar
End Sub


Tooltip example for Visual Basic

Private Sub Test_Click()

gLastSelectedObject.Tooltip = "This is a tooltip"
gLastSelectedObject.TooltipPenColor = 15555
gLastSelectedObject.TooltipPenStyle = 0
gLastSelectedObject.TooltipPenWidth = 1
gLastSelectedObject.TooltipBrushColor = 15555
gLastSelectedObject.TooltipBrushStyle = 0
gLastSelectedObject.TooltipBrushHatch = 0
gLastSelectedObject.TooltipFontHeight = 15
gLastSelectedObject.TooltipFontWidth = 0
gLastSelectedObject.TooltipFontFaceName = "Arial"
gLastSelectedObject.TooltipFontCharSet = 0
gLastSelectedObject.TooltipFontClipPrecision = 0
gLastSelectedObject.TooltipFontEscapement = 0
gLastSelectedObject.TooltipFontOrientation = 0
gLastSelectedObject.TooltipFontItalic = True
gLastSelectedObject.TooltipFontStrikeOut = False
gLastSelectedObject.TooltipFontUnderline = True
gLastSelectedObject.TooltipFontOutPrecision = 0
gLastSelectedObject.TooltipFontPitchAndFamily = 0
gLastSelectedObject.TooltipFontQuality = 0
gLastSelectedObject.TooltipPointX = 10
gLastSelectedObject.TooltipPointY = 10

gLastSelectedObject.ShowTooltip True

End Sub


Undo example for Visual Basic

    If (LEADVector1.CanUndo () = True) Then
        LEADVector1.Undo 0
    End If


UndoLevel example for Visual Basic

    LEADVector1.UndoLevel = 3


UnlockSupport example for Visual Basic

Dim bRet As Boolean

    bRet = LEADVector1.IsSupportLocked(L_SUPPORT_VECTOR)
    If (bRet = True) Then
        LEADVector1.UnlockSupport L_SUPPORT_VECTOR, "yourstringhere"
    End If


UseLights example for Visual Basic

'toggle lighting
    LEADVector1.PolygonMode = VECTOR_POLYGON_FILL
    LEADVector1.UseLights = True
    MsgBox "wait"
    LEADVector1.UseLights = False
    MsgBox "wait"

    'change the color
    LEADVector1.UseLights = True
    LEADVector1.AmbientColor = RGB(255, 0, 0)


VectorContainer example for Visual Basic

Private Sub LEADVector1_VectorContainer (ByVal nEventType As Integer, ByVal nObjectType As Integer, ByVal nState As Integer, ByVal nStatus As Integer)
    Dim x As Long
    Select Case nEventType
        Case VECTOR_CONTAINER_EVENT_DRAW
            If (nState = VECTOR_CONTAINER_STATE_END) Then
                Select Case nObjectType
                    Case VECTOR_CONTAINER_OBJECT_TYPE_POINT
                        Debug.Print "***************"
                        Debug.Print "Point was drawn"
                        Debug.Print "X= " & CStr(LEADVector1.AutoPointX(0))
                        Debug.Print "Y= " & CStr(LEADVector1.AutoPointY(0))
                        Debug.Print "Z= " & CStr(LEADVector1.AutoPointZ(0))
                        Debug.Print "***************"
                    Case VECTOR_CONTAINER_OBJECT_TYPE_LINE, _
                         VECTOR_CONTAINER_OBJECT_TYPE_SQUARE, _
                         VECTOR_CONTAINER_OBJECT_TYPE_RECT, _
                         VECTOR_CONTAINER_OBJECT_TYPE_CIRCLE, _
                         VECTOR_CONTAINER_OBJECT_TYPE_ELLIPSE
                        Debug.Print "***************"
                        Debug.Print "Object Type: " & CStr(nObjectType)
                        Debug.Print "StartX= " & CStr(LEADVector1.AutoPointX 0) & " EndX= " & CStr(LEADVector1.AutoPointX(1))
                        Debug.Print "StartY= " & CStr(LEADVector1.AutoPointY 0) & " EndY= " & CStr(LEADVector1.AutoPointY(1))
                        Debug.Print "StartZ= " & CStr(LEADVector1.AutoPointZ 0) & " EndZ= " & CStr(LEADVector1.AutoPointZ(1))
                        Debug.Print "***************"
                    Case VECTOR_CONTAINER_OBJECT_TYPE_POLYLINE
                        Debug.Print "***************"
                        Debug.Print "PolyLine was drawn"
                        Debug.Print "PointCount = " & CStr(LEADVector1.AutoPointCount)
                        Debug.Print "Points:"
                        For x = 0 To LEADVector1.AutoPointCount - 1
                            Debug.Print "X= " & CStr(LEADVector1.AutoPointX(x)) & " " & _
                                        "Y= " & CStr(LEADVector1.AutoPointY(x)) & " " & _
                                        "Z= " & CStr(LEADVector1.AutoPointZ(x))
                        Next
                        Debug.Print "***************"
                    Case VECTOR_CONTAINER_OBJECT_TYPE_BEZIER
                        Debug.Print "***************"
                        Debug.Print "Bezier was drawn"
                        Debug.Print "Points:"
                        For x = 0 To LEADVector1.AutoPointCount - 1
                            Debug.Print "X= " & CStr(LEADVector1.AutoPointX(x)) & " " & _
                                        "Y= " & CStr(LEADVector1.AutoPointY(x)) & " " & _
                                        "Z= " & CStr(LEADVector1.AutoPointZ(x))
                        Next
                        Debug.Print "***************"
                    Case VECTOR_CONTAINER_OBJECT_TYPE_ARC
                        Debug.Print "***************"
                        Debug.Print "Arc was drawn"
                        Debug.Print "X= " & CStr(LEADVector1.AutoPointX(0))
                        Debug.Print "Y= " & CStr(LEADVector1.AutoPointY(0))
                        Debug.Print "Z= " & CStr(LEADVector1.AutoPointZ(0))
                        Debug.Print "Radius     = " & CStr(LEADVector1.AutoRadius)
                        Debug.Print "StartAngle = " & CStr(LEADVector1.AutoStartAngle)
                        Debug.Print "SweepAngle = " & CStr(LEADVector1.AutoSweepAngle)
                        Debug.Print "***************"
                    Case VECTOR_CONTAINER_OBJECT_TYPE_TEXT
                        Debug.Print "***************"
                        Debug.Print "Text was drawn"
                        Debug.Print "String = " & LEADVector1.AutoString
                        Debug.Print "Left   = " & CStr(LEADVector1.AutoStringLeft)
                        Debug.Print "Top    = " & CStr(LEADVector1.AutoStringTop)
                        Debug.Print "Width  = " & CStr(LEADVector1.AutoStringWidth)
                        Debug.Print "Height = " & CStr(LEADVector1.AutoStringHeight)
                        Debug.Print "***************"
                End Select
            End If
    End Select
End Sub


VectorDataPath Example for Visual Basic

'start the load
LEADVector1.VectorDataPath = "http://10.1.1.105\booster.dxf"
Private Sub LEADVector1_ReadyStateChange(ByVal nReadyState As Long)
Static nCount As Integer
nCount = nCount + 1
Form1.Caption = "ReadyState = " & CStr(nReadyState) & " count= " &
CStr(nCount)
End Sub


VectorEngine example for Visual Basic

    'use OpenGL engine and double buffering
    LEADVector1.UseDoubleBuffer = True
    LEADVector1.VectorEngine = VECTOR_ENGINE_OPENGL
    LEADVector1.Load "s:\temp\images\dxf\test.dxf"


VectorEvent event example for Visual Basic

Private Sub LEADVector1_VectorEvent (ByVal nEvent As Integer, ByVal nStatus As Integer, ByVal nLevel As Long, ByVal nErrorCode As Integer, ByVal pObject As LEADVectorLibCtl.ILEADVectorObject, ByVal pLayer As LEADVectorLibCtl.ILEADVectorLayer, ByVal x1 As Double, ByVal y1 As Double, ByVal z1 As Double, ByVal x2 As Double, ByVal y2 As Double, ByVal z2 As Double, ByVal dwFlags As Long)
    'this sample will select each object as it is added
    'this sample will also print information about each layer that is added
    'NOTE: this could be very slow with a vector that has alot of objects!!
    Dim szOut$
    If (nEvent = VECTOREVENT_ADDOBJECT And nStatus = VECTOREVENT_STATUS_AFTER And nErrorCode = 0) Then
        pObject.Selected = True
    End If
    If (nEvent = VECTOREVENT_ADDLAYER And nStatus = VECTOREVENT_STATUS_AFTER And nErrorCode = 0) Then
        szOut$ = "Added Layer: " & pLayer.Name & " ID= " & CStr(pLayer.ID)
        Debug.Print szOut$
    End If
End Sub


VectorEvent method example for Visual Basic

    LEADVector1.VectorEvent 101, VECTOREVENT_STATUS_BEFORE
    LEADVector1.SetRotation 10, 10, -10, 0, 0, 0, False, VECTOR_ALL_OBJECTS
    LEADVector1.SetScaling 2, 2, 2, 0, 0, 0, False, VECTOR_ALL_OBJECTS
    LEADVector1.VectorEvent 101, VECTOREVENT_STATUS_AFTER


VectorUserMode example for Visual Basic

' Turn on Vector Automation
    LEADVector1.VectorUserMode = VECTOR_USERMODE_AUTO
    LEADToolBar1.CreateToolbar LEADVector1.Window, "Vector Tools", TOOLBAR_VECTOR
    LEADToolBar1.Visible = True

' Turn off Vector Automation
    LEADVector1.VectorUserMode = VECTOR_USERMODE_MANUAL


VertexBindMode example for Visual Basic

    'set bind mode
    LEADVector1.VertexBindMode = VECTOR_UNBIND_VERTICES
    'now scale the current object
    LEADVector1.SetScaling 3, 3, 3, 0, 0, 0, False, VECTOR_CURRENT_OBJECT


ViewContext example for Visual Basic

Private Sub Test_Click()

gLastSelectedObject.Description = "titanium camshaft for high performance"
gLastSelectedObject.ViewContextMinX = 0
gLastSelectedObject.ViewContextMinY = 0
gLastSelectedObject.ViewContextMinZ = 0
gLastSelectedObject.ViewContextMaxX = 100
gLastSelectedObject.ViewContextMaxY = 100
gLastSelectedObject.ViewContextMaxZ = 0

gLastSelectedObject.ViewContext = True

End Sub


ViewMode example for Visual Basic

    'toggle the ViewMode
    LEADVector1.AutoRepaint = True
    If (LEADVector1.ViewMode = VECTOR_VIEWMODE_FIT) Then
        LEADVector1.ViewMode = VECTOR_VIEWMODE_SNAP
    Else
        LEADVector1.ViewMode = VECTOR_VIEWMODE_FIT
    End If


ViewModeDlgViewMode example for Visual Basic

    LEADVector1.ViewModeDlgViewMode = LEADVector1.ViewMode
    LEADVector1.ShowViewModeDlg VECTOR_DLG_AUTOPROCESS Or VECTOR_DLG_SHOWPREVIEW


ViewportLeft example for Visual Basic

    'cut viewport in half
    LEADVector1.ViewportLeft = 0
    LEADVector1.ViewportTop = 0
    LEADVector1.ViewportWidth = LEADVector1.ViewportWidth / 2
    LEADVector1.ViewportHeight = LEADVector1.ViewportHeight / 2


ZoomRect example for Visual Basic

LEADVector1.ZoomRect 0, 0, 100, 100


Copyright Notices

©Copyright LEAD Technologies, Inc. 1991-2004. ALL RIGHTS RESERVED

Portions of the PCDLIB32.DLL, PCDLIB.DLL, LFFPX7.DLL, LFKODAK.DLL, EKFPIXJPEG140.DLL, PDC_SDK.DLL, PROFIRE.DLL, DC120V154_32.DLL, LFDCR14N.DLL, DCSPROBACK.DLL, DCSPRO3SLR.DLL, LFDCS14N.DLL, and LFKDC14N.DLL files contain material that is ©Copyright Eastman Kodak Company, 1996-2001. This software is based in part on the work of the Independent JPEG Group.

Portions of the LFCRW14N.DLL, LTCMP14.DLL, CDSDK.reg, CDSDK.dll, CDRAPCLS.dll, czs_ui.dll, deimg.dll, deImg010.dll, deImg110.dll, deImg153.dll, deimg301.dll, deimg401.dll, deImg404.dll, deimg602.dll, Deimg603.dll, DeImgd60.dll, pscAdimg.dll, pscCllct.dll, pscCStUI.dll, pscDcd.dll, pscDevUI.dll, pscDvlp.dll, Pscl2STI.dll, pscll.dll, pscParse.dll, pscSetup.dll, psdkdll.dll, psdkReg.dll, psParse.dll. file contain material that is © Canon, Inc. 2002

Portions of the LFFPX7.DLL and LFKODAK.DLL files contain material that is ©Copyright Hewlett Packard, 1996.

Portions of the OCR/ICR/OMR Features and the help file for the OCR/ICR/OMR Features are ©Copyright Scansoft, Inc. 1995-2003. ALL RIGHTS RESERVED

Portions of the Barcode Modules contain material that is ©Copyright Axtel Inc., 1999.

Portions of the LEADTOOLS PDF Plug in and the LEADTOOLS Vector Imaging Pro are ©Copyright 1996, 2000 Artifex Software Inc. All rights reserved.

File filters for decoding MrSID ® and DjVu ® formats are provided under a license from Lizardtech, Inc.

The "FlashPix" format uses Microsoft's OLE structured storage.

Portions of the DICOM help files in Medical Imaging product line are reprinted with permission from the National Electrical Manufacturers Association ©Copyright 1998 by the National Electrical Manufacturers Association. All rights including translation into other languages, reserved under the Universal Copyright Convention, the Berne Convention or the Protection of Literacy and Artistic Works, and the International and Pan American Copyright Conventions.

Portions of LEADTOOLS Data Security Add On contain software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/), including cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com). Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. Copyright Tim Hudson 1995-1998 (tjh@cryptsoft.com) All rights reserved.

Portions of LEADTOOLS Data Security Add On contain software based on the MD5 Message Digest Algorithm developed by RSA Data Security, Inc.. Copyright (c) 1991-92 RSA Data Security, Inc. All Rights Reserved.

Portions hereof licensed under US patent 5,327,254 and foreign counterparts.

Trademarks

LEAD® and LEADTOOLS® are registered trademarks of LEAD Technologies, Inc.
Microsoft, Windows, Windows NT, Visual Basic, Visual FoxPro, and Microsoft Access are either trademarks or registered trademarks of the Microsoft Corporation.
OS/2® is a registered trademark of International Business Machines Corporation.

TextBridge®OCR is a registered trademark of Scansoft, Inc.

ISIS® is a registered trademark of Pixel Translations, Inc.

ScanAhead™ is a trademark of Pixel Translations, Inc.

FlashPix™ is a trademark of Eastman Kodak Company.

All other brand or product names used in this online help are trademarks of their respective holders.

Address and Contact Information

LEAD Technologies, Inc.
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

(704) 332-5532
FAX: (704) 372-8161
E-mail: support@leadtools.com
Technical support: (704) 372-9681 or support@leadtools.com
Home page: http://www.leadtools.com


Topic Selection

LEAD Technologies, Inc. Suite 400 1201 Greenwood Cliff Charlotte, NC 28204 Sales@Leadtools.com www.leadtools.com	(704) 332-5532 FAX: (704) 372-8161 Tech Support: (704) 372-9681
LEADTOOLS is ideal for developers involved in still frame, multimedia, document, medical, and vector imaging projects, including Internet/Intranet applications.  Independent of the specific application requirement – scanning, file format support/conversion, compression, image processing, annotation, database support, multimedia, etc. – LEADTOOLS provides the most comprehensive, robust, flexible, and powerful imaging solution available.

	Click this button to start a new WinHelp session to review the License Agreements governing your use of the software.
	Click this button to start a new WinHelp session to review the full line of LEADTOOLS Products.
	Click this button to start a new WinHelp session to review the full line of LEADTOOLS Image Categories.


Barcode Modules

The following Barcode Modules are available from LEAD. Please note (*) that each module requires runtime-licensing.

LEADTOOLS 1D Symbols (read and write)   $1195*

LEADTOOLS 2D Code One (read)   $1595*

LEADTOOLS 2D Code One (write)   $1395*

LEADTOOLS 2D PDF417 (read)   $1595*

LEADTOOLS 2D PDF417 (write)   $1395*


Technical Support

As a registered user, free technical support is available. You must register your software to receive any technical support. Technical support is available 9 a.m. through 6 p.m. Eastern Standard Time. If you are calling by phone, please be at your computer. You can also contact us through the following methods:

Phone: 	(704) 372-9681

E-mail: 	support@leadtools.com

FAX: 	(704) 372-8161

Online Support / FAQs	http://www.leadtools.com (click on Customers Only)

Home page: 	http://www.leadtools.com

FTP:	ftp.leadtools.com

You can also contact LEAD by mail at:

LEAD Technologies, Inc.
Attn: Technical Support
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

Before calling technical support, please look in the online documentation and the example programs for an answer to your question.


Raster Pro/Document/Medical Features

Raster Pro:

LEADTOOLS Raster Imaging Pro provides some imaging capabilities that are not available in the LEADTOOLS Raster Imaging product.  In order to access these features, you must unlock support for L_SUPPORT_LTPRO, using UnlockSupport.  To unlock these features, call UnlockSupport(L_SUPPORT_LTPRO, L_KEY_LTPRO). L_KEY_LTPRO can be found in LtLckKey.inc.

If you are a licensed user of LEADTOOLS Raster Imaging, and would like to access Raster Imaging Pro features, you must contact Tech Support for information on obtaining a license and the unlock key for calling LSettings::UnlockSupport.

Document/Medical:

LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite are the most comprehensive imaging toolkits on the market.  No other toolkit provides as many imaging features for color, gray-scale and black & white images in one development package, and for one price.  These toolkits comprise LEAD's best code and are designed for the programmer who is looking for the fastest performance, and/or the most extensive color, document, and medical imaging capabilities available.

These toolkits contain powerful annotation capabilities and optimized document image processing filters, and high performance compression, decompression and viewing of JPEG, LEAD CMP, and CCITT G3/G4. The annotation capabilities enable the programmer to add text, highlights, sticky notes, audio, ellipses, buttons, lines, arrows, rectangles, polygons, redaction (blackout), hotspots, freehand scribble, pointers, bitmap and text stamps, to black & white and color images.  Programmers working with document imaging will also find special processing filters such as despeckle, deskew, favor black, and scale to gray to enhance their black and white 1 bit images.  Additionally, you can achieve faster rotation in 90-degree increments by applying a rotated view perspective to the bitmap. These LEADTOOLS toolkits offer the fastest software-only JPEG decoder available.

LEADTOOLS Document Imaging

The LEADTOOLS Document Imaging toolkit contains all the features available in the LEADTOOLS Raster Imaging Pro. In addition, it contains the following capabilities:

 Special functions for Document (bitonal) images. The LEADTOOLS functions for bitonal images are especially useful for working with images from black-and-white scanners or FAX machines. These functions let you do things such as automatically straighten (deskew) an image, remove spots (despeckle), or clarify a scaled display (using scale-to-gray and favor-black features).

 Annotation. LEADTOOLS supports annotation of images by letting you overlay images with text, lines, shapes, arrows, buttons, highlights, hot spots, sticky notes, stamps, buttons, and sounds.

 Fast rotation. LEADTOOLS achieves fast rotation in 90-degree increments by applying a rotated view perspective to the bitmap.

 ISIS support. LEADTOOLS supports ISIS interfaces for driving scanning devices.

 Faster compression and decompression. The Document/Medical editions work faster when loading and saving LEAD CMP, JPEG, and CCITT Group 3 and Group 4 images. The LEADTOOLS functions for loading and saving are the same in all products. The only difference is in performance.

 1-bit Image Clean-up. The Document toolkits include support for removing dots, blobs, holes, inverted text, lines, borders, bumps and nicks from 1-bit images.

 Region Clean-up. [Document/Medical] Remove all the holes from a region.

 Embedded Messages. The Document toolkits include support for embedding messages in lossless image formats like bmp, tiff, lossless jpeg, etc. The message is embedded without any visible changes to the image, and does not appreciably increase the size of the image. The message is password-protected.

 12 and 16 bit grayscale images. [Document/Medical] Load, process, display, window level and save 12 and 16 bit grayscale images (including support for 16-bit grayscale TIFF).

 48 and 64 bit color images. [Document/Medical] Load, process, display, and save 48 and 64 bit color images.

LEADTOOLS Document Imaging Suite

The LEADTOOLS Document Imaging Suite toolkit contains all the capabilities of LEADTOOLS Document Imaging, and includes the features listed below. Please note that the OCR features are included in this toolkit, however they can also be purchased as a plug-in for the LEADTOOLS Document Imaging toolkit. Also, JBIG support is provided in this toolkit, however a JBIG Module may be added on to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite.

 OCR features. [Document/Medical] LEAD offers OCR features that use Scansoft Textbridge technology. Support for these features is included in the LEADTOOLS Document Imaging Suite, and can be added, via plug-in to the LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite toolkits. The OCR features allow you to perform optical character recognition and turn images into documents. Features include preset confidence and accuracy levels for controlling how sensitive the engine is to unrecognized text, artificial intelligence for improving recognition on documents of the same type, and built-in and user-defined lexicons for limiting the type of text to recognize within a particular zone. LEADTOOLS provides the ability to verify or correct text during, and (using LEAD's unique OCR editor) after recognition. LEAD's OCR editor ties the text being edited directly to the image, providing a visual reference to the original bitmap data. The OCR engine can perform Automatic area segmentation creating multi-layered zones, recognizing areas such as tables, rules, images and text. Or, you can manually designate up to 250 such zones. The OCR features support different fonts, sizes (5 to 72 point) and styles. Fax, dot matrix and halftones can be preprocessed to improve recognition results. The OCR Engine supports major European and Scandinavian languages (Danish, Dutch, Finnish, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, and Swedish) as well as English. Support for dialects such as US. English, French Canadian, Latin American Spanish, Swiss German, and Brazilian Portuguese is also provided.

Recognized text can be exported to more than 40 different formats, including MS Word, MS Excel, Dbase andWordPerfect. The LEADTOOLS OCR features contain superior OCR processing speeds, for use in form recognition and processing applications.

 LEAD's JBIG filter. [Document/Medical] LEAD includes support for this filter in the LEADTOOLS Document Imaging Suite toolkit. Support for this filter can be added to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite by purchasing the JBIG Module. JBIG defines a method for lossless compression encoding of a bi-level image (two-color image). This method can also be used for coding grayscale and color images. LEADTOOLS completely supports all three types of images, giving you the ability to make full use of this powerful compression technology.  LEADTOOLS also supports the progressive capability of JBIG, allowing you to store and send multiple representations of images at different resolutions without any extra storage overhead.

LEADTOOLS Medical Imaging

LEADTOOLS Medical Imaging contains all the capabilities of LEADTOOLS Document Imaging.  It also includes general medical imaging technologies (1-16,24,32 bit color, 1-16 bit grayscale and window leveling of 12 and 16-bit grayscale images) and support for the DICOM file format.

 DICOM file support. [Medical] LEADTOOLS Medical Imaging provides COMPLETE support for the DICOM 3.0 specification, including all standard IOD classes and modalities (CR, CT, MR, NM, US, RF, SC, VL, etc.) and complete DICOM Basic Directory support.

 Window leveling. [Medical] Detect and set LowBit and HighBit for image data, display images with automatic LUT intensity expansion, or set LUT entries and ranges with specific values and gradients. Display images through the LUT without changing the data, or process the image data using the LUT. Linearize the number of pixels locally in a bitmap, based on the specified color space in order to bring out the detail in dark areas of an image, and smooth the edges between blocks.

 Medical Imaging Processing. [Medical] LEADTOOLS Medical Imaging provides image processing functionality designed specifically to allow you to examine and improve the quality of medical images.

LEADTOOLS Medical Imaging Suite

LEADTOOLS Medical Imaging Suite contains all the capabilities of LEADTOOLS Medical Imaging. In addition, it supports the following:

 DICOM Communication support. [Medical Suite] LEADTOOLS provides COMPLETE support for DICOM Communications, including all Service Classes (Verification, Storage, Query/Retrieve, Patient Management, etc), and contains high-level communications functions simplifying the creation of DICOM client/server applications.

(Document/Medical) is used in the documentation to designate the features that are available in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. Those features that are available only in the Medical toolkits are indicated in the documentation by (Medical). Features available only in the LEADTOOLS Medical Imaging Suite toolkit are indicated in the documentation by (Medical Suite).

(Internet only) is used in the documentation to designate the features that are available only in the LEADTOOLS Internet toolkit.

For more information, refer to Document/Medical Edition Support and Licensing Requirements.

	Click this button to start a new WinHelp session to review the full line of LEADTOOLS Products.


LEADTOOLS Documentation
LEADTOOLS Reference Manuals

LEADTOOLS provides reference manuals that contain the same information as the online help. You can print them from PDF files. Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

To print the PDF files, you must use the Adobe Acrobat Reader 3.0 or higher.  You can download a copy of the Acrobat Reader from the Adobe web site (http://www.adobe.com). Note that different versions of the Acrobat Reader are available for different operating systems, but they all can read the same PDF files.


Overview

A Vector image is a collection of vertices in either two or three-dimensional space.  A Bitmap image stores the image data as a 2D array of pixels. A Vector image stores the image data as lines, arcs, rectangles, and other shapes. Advantages of vector images include resolution independence and smaller file sizes. Vector images can be scaled very large or very small, and will not lose quality.

LEADTOOLS allows you to load vector images as raster bitmaps or as native vector images and provides support for both 2D and 3D vector images.

A vector image (or drawing) is referenced in LEADTOOLS by a vector handle. This vector is maintained in the Vector property of the LEADTOOLS Vector control.

Within the referenced vector image there are one or more vector layers. LEADTOOLS provides an interface for vector layers called ILEADVectorLayer. This interface contains properties that describe the vector layer and methods for manipulating the vector layer. In addition to the methods in the interface, LEADTOOLS provides several methods for working with vector layers. For more information, refer to Working with Vector Layers.

Each vector layer may contain 0 or more vector objects. LEADTOOLS supports the following vector objects:

VECTOR_ARC

VECTOR_CHORD

VECTOR_CIRCLE

VECTOR_ELLIPSE

VECTOR_ELLIPTICALARC

VECTOR_LINE

VECTOR_PIE

VECTOR_POLYBEZIER

VECTOR_POLYDRAW

VECTOR_POLYLINE

VECTOR_POLYGON

VECTOR_RASTER

VECTOR_RECTANGLE

VECTOR_STOCK

VECTOR_TEXT

VECTOR_VERTEX

VECTOR_HPOLYBEZIER

VECTOR_SPLINE

LEADTOOLS provides numerous methods for creating and manipulating vector objects. In addition, many methods and properties are provided for obtaining information about vector objects. For more information, refer to Working with Vector Objects.

A vector control must have a vector engine loaded for vector images to be rendered. The vector engine can be set in the VectorEngine property. LEADTOOLS supports GDI, DirectX and OpenGL engines. The default is GDI. After the vector engine is successfully loaded, all subsequent calls to the VECTOR methods will use this engine for rendering the vector image.

When displaying vector objects, the user can modify the way the objects are displayed by setting anti-aliasing options, setting text rendering characteristics, providing a tool tip, or other display options. LEADTOOLS provides the following methods, events and properties to help in modifying the display:

AntiAliasingDim property

AntiAliasingFilter property

AntiAliasingThreshold property

ClipMode property

RenderTextAsCurves property

A vector object may be hyperlinked with one or more targets, allowing the user to run a program, access a Web page, open a document, or focus the toolkit to a specific vector object. For more information about hyperlinking vector objects, refer to Hyperlink Objects.


Programming with LEADTOOLS Vector OCX

The following topics provide a systematic approach to understanding and using the LEAD Vector control's properties, methods, and events:

General

Registering and Unregistering the ActiveX Controls

Unlocking Support for the Vector Features

Unlocking Special LEAD Features

Overview

Loading and Saving Vectors

Viewing a Vector Image

Working with the Mouse and the Keyboard

General Support

Working with Vector Handles

Working with Vector Layers

Working with Vector Groups

Working with Vector Objects

Using the Clipboard

Working with EMF and WMF Files

Vector Dialogs

Printing a Vector Image

Hyperlink objects

Working with the Tooltips

Working with the View Context

Help support

Automation

Introduction to Automation

Automation Container

The Automation Toolbar

Automation Printing

Editing Automation Containers

Handling Container Events

Undoing and Redoing Automation Operations

Working with Objects within an Automation Container


Registering and Unregistering the ActiveX Controls

Registering ActiveX Controls

Before the VECTOR ActiveX Control can be used, it must be registered.  The installation program automatically registers all the LEADTOOLS Controls.  If you would like to manually register the controls run:

REGSVR32.EXE for 32-bit ActiveXs

found in the BIN directory and pass the name of the ActiveX to register as a parameter.

EX.:

REGSVR32 LTVEC14N.OCX will register the VECTOR ActiveX.

Unregistering ActiveX Controls

To unregister the VECTOR ActiveX Control, include the "/u" switch before the ActiveX name when running:

REGSVR32.EXE for 32-bit ActiveXs

EX.:

REGSVR32 /u LTVEC14N.OCX will unregister the VECTOR ActiveX.

NOTE: The LEADTOOLS ActiveXs do not register without certain DLLs. For a full listing of the required files for the Main Control Module, refer to Files To Be Included With Your Application.


Unlocking Support for the Vector Features

All LEADTOOLS Vector Features are included in the LEADTOOLS Vector Imaging Pro toolkits. The Vector features are shipped with the LEADTOOLS products listed above, however they are locked. To use the Vector functionality, UnlockSupport must be called with the key found on the Vector Features Unlock Certificate, included in your product packaging. UnlockSupport(L_SUPPORT_VECTOR, "Vector Features Unlock Certificate key") tells the package to unlock support for the Vector features and passes the key for verification.

Unlocking support for the Vector Features also unlocks support for the following file formats: DXF, DWF, DWG, PCT, PLT, DRW, DGN, WMF, EMF and CGM.


Unlocking Special LEAD Features

LEAD offers a variety of features, such as Document support, Medical support, Vector support, etc., which are only available in certain toolkits and are locked. To use these features you must:

 purchase a toolkit that supports the desired feature(s).

 print the applicable runtime agreement from the help file. For information on the runtime agreements, go to Topic Selection and click on the LEAD Licensing button.

 complete the Transmittal document and fax it and the runtime agreement to LEAD's Licensing Department at 704 – 372 – 3789. (To view the transmittal document you must have Adobe® Acrobat® installed.)

 if prepaid licenses are desired, include the order form with payment information. You can fax this along with the Transmittal form and the runtime agreement. (To view the order form you must have Adobe® Acrobat® installed.)

 once we have received the signed agreement, we will send instructions for eliminating the license dialogs and the key(s) necessary for unlocking the appropriate features.

 when you have received the instructions and the key(s) call the UnlockSupport method with the appropriate key.

For example, if you have purchased the LEADTOOLS Document Imaging toolkit:

 print the Document Imaging Agreement (or the Document Imaging with OCR Agreement if you have also purchased the LEADTOOLS OCR Module).

 complete the Transmittal document and fax it and the Document Imaging Agreement (or the Document Imaging with OCR Agreement) to LEAD's Licensing Department.

 if you want prepaid licenses, print a copy of the order form, fill it out and send the order form and payment information to LEAD.

 once we have received the signed Document Imaging Agreement (or Document Imaging with OCR Agreement), we will send the instructions for eliminating the license dialogs and any necessary keys.

 when you receive the instructions and the key(s), call UnlockSupport (L_SUPPORT_DOCUMENT, "Document Key") to unlock the Document features. Please note that "Document Key" represents the actual key you will receive from LEAD. Also note that if you also purchased the LEADTOOLS OCR Module, the OCR features will have to be unlocked separately, using the appropriate key.

For information on products and the features available in each product, or for information on licensing, refer to Topic Selection.

To determine if a certain feature is locked, call the IsSupportLocked method.


Loading and Saving Vectors

For loading and saving vector images, LEADTOOLS provides the following:

Vector property

Load method

Save method

LoadArray method

SaveArray method

ArraySize method

LoadMemory method

SaveMemory method

StartFeedLoad method

FeedLoad method

StopFeedLoad method

Use the following elements to manage asynchronous loading of a vector from a local file or from an Internet URL. Note that these elements require version 3.01 of the Microsoft Internet Explorer, which is available from http://www.microsoft.com.

VectorDataPath property

ReadyStateChange event

To set the file format to try first when recognizing files for loading, set the PreferredLoadFormat property.


Viewing a Vector Image

The way an image is viewed depends on a number of viewing characteristics. LEADTOOLS provides the following methods and properties for modifying these viewing characteristics:

For displaying vector images, LEADTOOLS provides the following:

Appearance property

AutoRepaint method

AutoScroll property

BackColor property

BackErase property

BorderStyle property

ForceRepaint method

InvertColors method

ViewPortHeight property

ViewPortLeft property

ViewPortTop property

ViewPortWidth property

ZoomRect method

In addition, the following properties control how the vector image is rendered on the display, including the 3D viewing options:

AmbientColor property

PolygonMode property

UseDoubleBuffer property

UseLights property

VectorEngine property

ViewMode property

The PanX and PanY properties allow you to manually pan the vector image when the AutoScroll property is set to False.

LEADTOOLS allows you to control the camera angle and distance using the following:

CameraDistance property

CameraLookAtX property

CameraLookAtY property

CameraLookAtZ property

CameraUsePerspective property

CameraPhi property

CameraTheta property

The camera can be used to control the viewing perspective of the vector image.


Working with the Mouse and the Keyboard

LEADTOOLS provides the following mouse and keyboard customization:

Click event

DblClick event

KeyDown event

KeyPress event

KeyUp event

MouseDown event

MouseIcon property

MouseMove event

MousePointer property

MouseUp event


General Support

LEADTOOLS provides the general support properties and methods:

IsSupportLocked method

UnlockSupport method

EnableMethodErrors property


Working with Vector Handles

LEADTOOLS references vector images loaded in the control through a vector handle. This vector handle is contained in the Vector property. Several methods and properties are provided that let you get or set information that pertains to the vector handle itself.

The Empty method deletes all vector layers and vector objects from the vector handle. To determine whether a vector handle is empty, call the IsEmpty method.

A vector handle can be locked to prevent any changes from being made. The Locked property locks or unlocks the vector handle. Locking a vector handle has precedence over locking vector layers within the vector handle. Therefore, if a vector handle is locked, the layers within that vector handle cannot be edited, even if the vector layers are not locked. To determine whether a vector handle is locked, check the Locked property.

Each vector handle has an origin point. The origin point is contained in the OriginX property, the OriginY property and the OriginZ property. The origin may change when new vector objects are added. To center the vector image around its origin, and to update the OriginX, OriginY and OriginZ properties with the new origin point, call the Reset method, with the appropriate flag setting, after adding new objects.

When a vector object is selected in a vector handle, a marker is used to indicate that the object is selected. The marker settings that indicate how the marker will look are contained in the following properties:

MarkerPenStyle property

MarkerPenWidth property

MarkerPenColor property

MarkerBrushStyle property

MarkerBrushColor property

MarkerBrushHatch property

To change the marker characteristics, set the above properties.

For each vector handle a bounding parallelogram exists for the vector objects contained in the vector handle. The points that define that bounding parallelogram can be found in the following properties:

ParallelogramMinX property

ParallelogramMinY property

ParallelogramMinZ property

ParallelogramMaxX property

ParallelogramMaxY property

ParallelogramMaxZ property

After adding new vector objects to a vector handle, the logical size of the image might change. Call the Reset method with the appropriate flag setting to have the new bounding parallelogram calculated and the properties listed above updated.

The vector handle of one control can be copied to the vector handle of another control by assignment. The CopyFlags property controls how the copy process will be carried out when this assignment occurs.

The vector objects contained within a vector handle can be hidden or shown, based on the value of the Hidden property of the ILEADVectorObject interface. To determine whether any hidden objects exist with the vector handle, call the IsAnObjectHidden method.

The display options for a vector handle determine how the vector objects in that vector handle will be displayed. These display characteristics include the clip mode, anti-aliasing and text rendering options.

In addition to modifying the display options, the appearance of the objects within the vector handle may also be changed by inverting the colors. This is done using the InvertColors method method.


Working with Vector Layers

LEADTOOLS provides a number of methods and properties for working with the vector layers within a vector handle.

Getting Information about Vector Layers

A vector handle may contain multiple vector layers. The LayerCount property contains the number of layers present in a vector handle. Once the number of layers present is known, each layer can be obtained using the GetLayerByIndex method. If the name of a layer is known, that layer can be obtained using the GetLayerByName method. The EnumLayers method actually enumerates all the layers present in a vector handle. For each layer found by the EnumLayers method, a VectorLayers event is triggered, letting you process each enumerated layer.

Within a vector handle one layer is active. The GetActiveLayer method returns an interface to the active vector layer.

The vector layer interface returned by the GetLayerByIndex, GetLayerByName and GetActiveLayer methods contains properties that describe the layer and methods for manipulating the layer. For more information about the vector layer interface and the vector object interface, refer to Vector Interfaces.

Manipulating Vector Layers

LEADTOOLS provides the following methods for manipulating vector layers:

The AddLayer method lets you add a new layer to a vector handle.

The contents of one layer can be copied to another layer using the CopyLayer method.


Working with Vector Objects

LEADTOOLS provides numerous methods and properties for working with vector objects within vector layers.

Getting Information About Vector Objects

A vector handle may contain multiple vector layers and each vector layer may contain many objects. LEADTOOLS provides a number of methods and properties for obtaining information about one or more objects present in a vector handle or a vector layer. The information that can be obtained includes the number of objects present, the location of objects, the boundaries of one or more objects, etc.

The EnumObjects method will call the VectorObjects event once for each object in the vector image, each time setting the CurrentObject property to the enumerated object. The EnumVertices method will call the VectorVertices event once for each vertex in the vector image. You can set the StopEnum property to True to cancel either object or vertex enumeration. The CurrentObject property is a vector object interface that contains properties that describe the vector object and methods for manipulating the vector object.

Several methods and properties provide information on the location and boundaries of one or more vector objects. The IsObjectsInsideParallelogram and IsObjectsInsideRect methods determine whether the specified object(s) is(are) within the specified parallelogram and rectangle. In addition, the following methods and properties provide location and boundary information about one or more objects:

GetObjectsRect method

LogicalToPhysical method

LogicalX property

LogicalY property

LogicalZ property

ObjectParallelogramLeftTopX property

ObjectParallelogramLeftTopY property

ObjectParallelogramLeftTopZ property

ObjectParallelogramRightBottomX property

ObjectParallelogramRightBottomY property

ObjectParallelogramRightBottomZ property

ObjectRectHeight property

ObjectRectLeft property

ObjectRectTop property

ObjectRectWidth property

PhysicalToLogical method

The HitTest method allows you to test a physical coordinate for a vector object. If an object is under that specified coordinate, the CurrentObject property will be set to that object. The HitTestDistance and HitTestFlags properties can be used to modify the performance of the HitTest method.

You can select or deselect all objects using the SelectAllObjects method. The IsAnObjectSelected method will return TRUE if at least one object is currently selected.

Manipulating Vector Objects

LEADTOOLS provides many methods for manipulating vector objects.

One or more vector objects can be modified by scaling, rotation and translation, using the following properties and methods:

RotationX property

RotationY property

RotationZ property

ScalingX property

ScalingY property

ScalingZ property

SetRotation method

SetScaling method

SetTranslation method

TranslationX property

TranslationY property

TranslationZ property

Occasionally, vector objects will share vertices. When a vector object is modified, the object with which it shares one or more vertices may or may not be modified, depending on the "bind vertices mode" value. This value is contained in the VertexBindMode property.

Some vector objects can be exploded into simpler vector objects using the ExplodeObjects method.

The DeleteObjects method deletes one or more vector objects.

A vector object can be copied within the same layer, from one layer to another layer within the same vector handle, or from a layer in one vector handle to a layer in another vector handle using the CopyObject method.

The AddNewObject method lets you add a new vector object to a vector layer.

The Free method will release the memory used for the current vector image.

Use the Reset method to do the following

 reset a vector image's scale, rotate, and translate settings to the default.

 center the vector image around a new origin and update the OriginX, OriginY and OriginZ properties.

 determine the new boundaries of the vector image following the addition of one or more new objects and update the ParallelogramXXX properties.

The Realize method can be used to rasterize a vector image into a bitmap.

A vector object can be hidden or shown, based on the value of the Hidden member of the ILEADVectorObject interface.

A vector object may contain a description string giving you some information about the object itself. To get or set or change the description for a vector object, call ILEADVectorObject::Description.

A vector object may also have a tool tip associated with it. For more information on tool tips, refer to Working with Tooltips.

In addition, vector objects may also be hyperlinked. For more information about hyperlinking vector objects, refer to Hyperlink Objects.

How an object is displayed may be affected by its view context. For more information on this, refer to Working with View Context.


Using the Clipboard

The clipboard is a standard Windows object for copying data from one application to another. LEADTOOLS provides the Copy method to copy vector data from a vector handle to the clipboard. To copy vector data from the clipboard to a vector handle, call Paste method. To determine whether the clipboard contains valid vector data for copying, call the ClipboardReady method.


Working with EMF and WMF Files

When working with EMF and/or WMF files, the following methods allow for conversion between vector handles and EMF or WMF files:

ConvertFromEMFHandle method

ConvertFromEMFPicture method

ConvertFromWMFHandle method

ConvertFromWMFPicture method

ConvertToEMFHandle method

ConvertToEMFPicture method

ConvertToWMFHandle method

ConvertToWMFPicture method

The ConvertToEMFHandle, ConvertToEMFPicture, ConvertToWMFHandle and ConvertToWMFPicture methods take parameters that indicate the size of the resulting EMF or WMF image. This allows you to create an EMF or WMF with the same logical size as the printer, resulting in high image quality when finally printing the EMF or WMF file.


Vector Dialogs

The vector control provides a set of common dialog boxes that combine Window Common Dialog functionality with vector functionality contained in LEADTOOLS. For a list of required DLL's, refer to Files To Be Included With Your Application. Vector Common Dialogs are provided for Vector Scaling, Vector Rotation, Vector Translation, Camera settings, View mode, Hit testing, Vector layer creation, Vector layer editing, Vector object creation and Vector object editing. These dialogs can return the user's input, or optionally auto-process the vector image. For more information, refer to the Vector Dialog properties and methods listed below:

The following pertain to the Camera dialog:

ShowCameraDlg method

CameraDlgDistance property

CameraDlgLookAtX property

CameraDlgLookAtY property

CameraDlgLookAtZ property

CameraDlgUsePerspective property

CameraDlgPhi property

CameraDlgTheta property

The following pertains to the Edit All Groups dialog:

ShowEditAllGroupsDlg method

The following pertains to the Edit Group dialog:

ShowEditGroupDlg method

The following pertain to the Edit Layer dialog:

ShowEditLayerDlg method

EditLayerDlgActiveLayer property

The following pertain to the Hit Test dialog:

ShowHitTestDlg method

HitTestDlgFlags property

HitTestDlgDistance property

The following pertain to the New Group dialog:

NewGroupDlgName property

ShowNewGroupDlg method

The following pertain to the New Layer dialog:

ShowNewLayerDlg method

NewLayerDlgActiveLayer property

NewLayerDlgLocked property

NewLayerDlgName property

NewLayerDlgUserTag property

NewLayerDlgVisible property

The following pertain to the Render dialog:

ShowRenderDlg method

RenderDlgAmbientColor property

RenderDlgPolygonMode property

RenderDlgUseLights property

The following pertain to the Rotate dialog:

ShowRotateDlg method

RotationDlgX property

RotationDlgY property

RotationDlgZ property

RotationDlgOriginX property

RotationDlgOriginY property

RotationDlgOriginZ property

The following pertain to the Scale dialog:

ShowScaleDlg method

ScaleDlgOriginX property

ScaleDlgOriginY property

ScaleDlgOriginZ property

ScaleDlgX property

ScaleDlgY property

ScaleDlgZ property

The following pertain to the Translate dialog:

ShowTranslateDlg method

TranslateDlgX property

TranslateDlgY property

TranslateDlgZ property

The following pertain to the ViewMode dialog:

ShowViewModeDlg method

ViewModeDlgViewMode property

The following pertains to the Edit All Layers dialog:

ShowEditAllLayersDlg method

The following pertains to the Edit Object dialog:

ShowEditObjectDlg method

The following pertains to the New Object dialog:

ShowNewObjectDlg method


Vector Handle Events

Certain events that occur within a vector handle generate calls to the VectorEvent event. This event receives information on the calling event through the parameters. For information on the types of events that the vector handle can generate, refer to the VectorEvent event.

LEADTOOLS also provides the VectorEvent method for implementing a user-defined event. This method also lets you group several operations into one event. To do this you must call the VectorEvent method with the nStatus parameter set to VECTOREVENT_STATUS_BEFORE. This identifies the beginning of the event. Once all the operations you wish to include have been completed, call the VectorEvent method with the nStatus parameter set to VECTOREVENT_STATUS_AFTER. This notifies the toolkit that the operation(s) have been completed successfully.


Printing a Vector Image

Use the following method to print a vector image in any device context:

Render method

You can use the following methods to get the device context of the printer and to control the print job.

PrintEnd method

PrintStart method

To print the objects in the active automation container that are currently displayed on the screen, use the AutoRender method.

For information on improving the print quality of vector images stored as WMF or EMF files, refer to Working with EMF and WMF Files.


Working with Vector Groups

LEADTOOLS provides a number of methods and properties for working with the vector groups within a vector handle.

Vector groups can be used to group vector objects. A vector object is added to a group using object descriptor information. Therefore, once a vector object is added to a group, there is no relationship between the object in the group and the original object in the vector handle. The original object can be changed without affecting the corresponding object in the vector group, and vice versa.

Vector groups can also be cloned and added to a vector handle. However, if an object within a vector group is modified, all clones of that group will also be modified.

Getting Information about Vector Groups

A vector handle may contain multiple vector groups. The GroupCount property contains the number of groups present in a vector handle. Once the number of groups present is known, each group can be obtained using the GetGroupByIndex method. If the name of a group is known, that group can be obtained using the GetGroupByName method. The EnumGroups method actually enumerates all the groups present in a vector handle. For each group found by the EnumGroups method, a VectorGroups event is triggered, letting you process each enumerated group.

The vector group interface returned by the GetGroupByIndex and GetGroupByName methods contains properties that describe the group and methods for manipulating the group. For more information about the vector group interface, vector layer interface and the vector object interface, refer to Vector Interfaces.

Manipulating Vector Groups

LEADTOOLS provides the following methods for manipulating vector groups:

The AddGroup method lets you add a new group to a vector handle.

The contents of one group can be copied to another group using the CopyGroup method.

The ILEADVectorGroup contains the Empty method for removing all vector objects from a vector group and the DeleteGroup for removing a vector group from a vector handle.

Vector groups can also be modified by modifying the objects within them. A new object can be added using the ILEADVectorObject::InsertInGroup method.

ILEADVectorGroup::EnumObjects lets you enumerate all the objects contained within a group. This method generates a VectorObjects event for each object enumerated. This provides the means for processing each object within a group.


Cloning a Vector Group

A group of vector objects can be cloned and added to a vector handle as a clone object. The steps used to accomplish this are as follows:

1.	Add a new group to the current vector handle.

2.	Add a new object of the desired type.

3.	Set the object properties.

4.	Insert the new object into the group.

5.	Repeat steps 2 – 4 as needed until the group contains all desired objects.

6.	Add a new layer. (This is not necessary if a layer already exists.)

7.	Add a new object of type VECTOR_CLONE.

8.	Set the object properties, including the CloneGroup property. The CloneGroup property indicates the group to be cloned.

9.	Insert the new object into the layer.

For example code that shows this process, refer to:

AddGroup Example for Visual Basic

AddGroup Example for C++ 4.0 and later.


Introduction to Automation

Using the Vector Automation mode will enable you to add Vector drawing capabilities to an application. The Vector toolkit automation mode coordinates the low-level Vector toolkit capabilities, container features and LEAD toolbar capabilities. This facilitates the building of a vector application and removes the need to understand all the low level functionality.

The Automation features can do the following:

 set the Undo/Redo level to virtually any value, as well as Undo or Redo automation operations.

 select All or None of the objects in the active automation container. In addition, the current selection can be cut, copied, pasted or deleted.

 print the vector drawing.

The toolbar lets the user select the needed tool and draw, while the visual feedback needed to communicate between the drawing process and the user is handled automatically. Mouse cursors and the basic drawing algorithms for selected objects (Line, Ellipse, Polygon…etc.) are handled by automation. The Vector objects currently available in the toolkit are:

Arc.

Chord.

Circle.

Ellipse.

Line.

Pie.

Polybezier.

Polydraw.

Polygon.

Polyline.

Raster.

Rectangle.

Text.

Vertex.

The user should have a good grasp of the following LEAD toolkits before effectively using the automated Vector Toolkit:

 Low-level Vector toolkit.

 LEAD Toolbar.

Therefore, we strongly recommend that the user of the Vector Automation features carefully read the documentation of the modules mentioned above.


Automation Container

LEADTOOLS provides a Vector Automation interface (ILTVectorAutomation) for controlling pen, brush and font characteristics of objects being drawn using vector automation. This interface is accessed through the AutomationProps property. In addition there is a Vector Container interface (ILTVectorContainer) that controls automation container characteristics such as container boundaries, cursors used for the various container object types, handles used for editing objects within the container and the enable/disable status of the container. This interface is accessed through the AutoContainer property. Any objects created using vector automation are "contained" within the vector container.

Vector automation must first be turned on by setting the VectorUserMode property to VECTOR_USERMODE_AUTO. At this point you can create the Toolbar using the LEADTOOLS Toolbar control and set the automation ToolbarControl property to the newly created toolbar. This associates the toolbar with the automation. Once automation has been turned on, the active container can be set using the AutoContainer property. At this point the application should be ready to change automation characteristics, change automation container characteristics, or start drawing.

For examples that show how to start vector automation, create a toolbar and activate the automation container, refer to the following tutorials:

Implementing Vector Automation for Visual C++

Implementing Vector Automation for Visual Basic

Adding the Automation Container for Visual C++.

Adding the Automation Container for Visual Basic.


The Automation Toolbar

To add a toolbar to the vector automation, a toolbar must first be create using the LEADTOOLS Toolbar control. Once the toolbar has been created, it becomes associated with the vector automation by setting the ToolbarControl property to the newly created toolbar. For more information on creating a toolbar, refer to the LEADTOOLS Toolbar OCX Help File, Lttbocxn.hlp in the LEAD/HELP directory.

For an example that shows how to add a toolbar to vector automation, refer to the following tutorials:

Implementing Vector Automation for Visual C++.

Implementing Vector Automation for Visual Basic


Automation Printing

To print data in the automation container that is currently displayed on the screen, use the AutoRender method.


Editing Automation Containers

LEADTOOLS Vector Control Automation features provide several methods for editing automation containers. These methods act on the active automation container. For editing methods that involve the clipboard, use the following:

AutoCut method

AutoCopy method

AutoPaste method

To determine whether the clipboard contains valid automation data for pasting to the active automation container, call the ClipboardReady method.

The AutoDelete method deletes objects from the active automation container.


Handling Container Events

When the user uses the Vector Automation to create an object, select objects, etc. a VectorContainer event is fired. Depending on the action that generated the event, certain information is also passed to the VectorContainer event.

If an error occurred, the VectorContainer event will receive an error code in the nStatus parameter. If the VectorContainer event was fired by a drawing event, information will be passed to the VectorContainer event in the nObjectType and nState parameters.

When an object is drawn in a container a series of states occur during the process of drawing that object. The state may be the beginning of the drawing process, a continuation of the drawing process, the ending of the drawing process, or the aborting of the drawing process. The following are the states currently supported for processing:

VECTOR_CONTAINER_STATE_ABORT

VECTOR_CONTAINER_STATE_BEGIN

VECTOR_CONTAINER_STATE_PROCESS

VECTOR_CONTAINER_STATE_END

Also when an object is drawn, the VectorContainer event receives information about the type of object drawn. Currently the LEADTOOLS Vector Control Automation features support the following container object types:

Container Object Value	Meaning

VECTOR_CONTAINER_OBJECT_TYPE_ARC	ARC

VECTOR_CONTAINER_OBJECT_TYPE_BEZIER	Bezier

VECTOR_CONTAINER_OBJECT_TYPE_CIRCLE	Circle

VECTOR_CONTAINER_OBJECT_TYPE_ELLIPSE	Ellipse

VECTOR_CONTAINER_OBJECT_TYPE_LINE	Line

VECTOR_CONTAINER_OBJECT_TYPE_POINT	Point

VECTOR_CONTAINER_OBJECT_TYPE_POLYLINE	Polyline

VECTOR_CONTAINER_OBJECT_TYPE_RECT	Rect

VECTOR_CONTAINER_OBJECT_TYPE_SQUARE	Square

VECTOR_CONTAINER_OBJECT_TYPE_TEXT	TEXT

Please note that certain containers support more than one vector object type. For example, the VECTOR_CONTAINER_OBJECT_TYPE_ARC also supports vector pie and vector chord objects.

Depending on the type of object drawn, certain properties get updated with information about the drawn object. The AutoPointX, AutoPointY and AutoPointZ properties are updated with the coordinates of one or more points, depending on the object drawn in automation mode. If a vector arc object is drawn, AutoPointX, AutoPointY and AutoPointZ are updated with the coordinates of the vertex of the arc. (The point about which the arc sweeps.) If a vector Polyline object is drawn, AutoPointX, AutoPointY and AutoPointZ are updated with the coordinates of all points within the Polyline object.

If the object drawn is of type VECTOR_CONTAINER_OBJECT_TYPE_ARC, then the AutoPointX, AutoPointY and AutoPointZ properties are updated with the coordinates of the vertex of the arc. In addition, the AutoRadius property, AutoStartAngle property and the AutoSweepAngle property are updated with the arc's radius, starting angle and sweep angle, respectively.

If the object drawn is of type VECTOR_CONTAINER_OBJECT_TYPE_TEXT, then the AutoString, AutoStringHeight, AutoStringLeft, AutoStringTop and AutoStringWidth properties are all updated with information about the text object.


Undoing and Redoing Automation Operations

The LEADTOOLS Vector Control Automation features include the capability for undoing and redoing automation operations. The undo level determines the number of operations that can be undone in the automation container. For each undo that is performed, a redo operation can be performed.

LEADTOOLS provides a number of methods and properties for handling the undo/redo capabilities.

The UndoLevel property contains the undo level for the automation container of the vector control. The default value is 16.

To determine whether the last automation operation performed can be undone or redone, use the CanUndo method and the CanRedo method respectively.

The Undo method undoes the last automation operation performed, while the Redo method redoes the last automation operation undone.

For an example that shows the general undo and redo capabilities, refer to the following tutorials:

Undo and Redo Capabilities for Visual C++.

Undo and Redo Capabilities for Visual Basic.

Generally, operations are undone one operation at a time. If the last operation performed cut several objects from a container, undoing that operation would return the objects to the container. Occasionally, it may be best to group several operations together so that calling the Undo method undoes the whole group of operations and not just the last operation performed. This can be accomplished using the following steps:

1. Call the AddUndoNode method to add an undo node to the automation container.

2. Disable the undo feature by calling the EnableUndo method (FALSE).

3. Perform the operations to be combined into one undo. For example:

Vector Rotate

Vector Scale

Vector Translate

4. Re-enable the undo feature by calling the EnableUndo method (TRUE).

When the Undo method is called for this node, all of the combined operations will be undone.


Working with Objects within an Automation Container

General

All objects within the active automation container may be selected or unselected using the AutoSelect method.

Vector Objects

Vector objects drawn within an automation container may be affected by pen properties, brush properties and font properties. These properties can be changed using the AutomationProps property.

To edit a vector object within an automation container, call the AutoEditObject method.


Hyperlink Objects

A vector object may be hyperlinked to run a program, access a Web page, open a document or focus the view of the toolkit on a particular vector object within the scene. This is done by hyperlinking the vector object with one or more "targets". Each vector object that is hyperlinked maintains a target list. To open a document or run an application, the target should be set to the file name of the document to open or the program to run. To access a Web page, the target should be set to the URL to access. To focus the toolkit on a specific vector object, the target should be set to that vector object.

To add a new target to a vector object and make it a hyperlinked vector object, or to add an additional target to a vector object that already has one or more other hyperlink targets, call ILEADVectorObject::AddHyperlinkObject. Once a target has been added to a vector object's target list, the target can be changed by calling the ILEADVectorObject::SetHyperlinkObject method.

To retrieve information about a specific target, call the ILEADVectorObject::GetHyperlink method. To determine how many targets the hyperlinked vector object is maintaining, the property ILEADVectorObject::HyperlinkCount can be used. ILEADVectorObject::HyperlinkCount will retrieve the number of items in the target list.

When the hyperlinked vector object is clicked, the ILEADVectorObject::GotoHyperlink must be called with the chosen target in the target list. This activates the target.


Mapping Fonts

A font mapper is a FontMapper event, defined by the user, which is used to set the font characteristics for any text added to the vector handle after enabling a font mapper for a vector handle by setting the EnableFontMapper property to TRUE.

For example, consider the situation in which the user is loading a CGM file that contains text of font Arial. If a font mapper event has not been enabled by setting the EnableFontMapper property, the user has no control over the font of the text, and it will be added to the vector drawing as Arial. If a font mapper event is defined before the CGM file is loaded, the user can catch the font of the text in the SubstitutedFont property and change it to something such as Courier New. When the text that is part of the CGM file is added to the vector drawing, the text will appear as Courier New instead of Arial.


Working with the Tooltips

A tool tip may be used to provide a small amount of information about a vector object. This is generally displayed when the cursor moves over the object. To use a tool tip, first the property ILEADVectorObject::Tooltip should be set to the tool tip string. The tool tip can then be displayed or hidden by calling ILEADVectorObject::ShowTooltip.

These options can be set or retrieved using the following properties:

TooltipPointX

TooltipPointY

TooltipPenStyle

TooltipPenWidth

TooltipPenColor

TooltipBrushStyle

TooltipBrushColor

TooltipBrushHatch

TooltipBrushHatch

TooltipFontHeight

TooltipFontUnderline

TooltipFontItalic

TooltipFontOrientation

TooltipFontEscapement

TooltipFontWidth

TooltipFontFaceName

TooltipFontPitchAndFamily

TooltipFontQuality

TooltipFontClipPrecision

TooltipFontOutPrecision

TooltipFontCharSet

TooltipFontStrikeOut.

All these properties should be used according to MS SDK documentation for LOGPEN, LOGBRUSH and LOGFONT.


Working with the View Context

The view context space is a vector space assigned to a vector object. The context space is the area to be displayed when the object is the target of a hyperlinked vector object.

To set or remove a view context of an object use the ILEADVectorObject::ViewContext property.

These options can be set or retrieved using the following properties:

ViewContextMinX

ViewContextMinY

ViewContextMinZ

ViewContextMaxX

ViewContextMaxY

ViewContextMaxZ

The user should set the ILEADVectorObject::ViewContext property to TRUE to enable the use of the view context or FALSE to stop or disable the usage of the view context.


Help support

To enable context-sensitive help support in the toolkit, write an implementation for the Help event (), then set the EnableHelp Property to TRUE. To enable the Help button on a common dialog box, which is disabled by default, set the EnableDlgHelpButton property to TRUE.


Data Types

LEADTOOLS Vector Data Types

MarkerBrushHatchStyles

MarkerBrushStyles

MarkerPenStyles

VectorObjectType

VectorPointType

VectorROPCode

Automation / Container Data Types

VectorContainerObjectType

Interfaces

Vector Interfaces

Automation / Container Interfaces


MarkerBrushHatchStyles

typedef enum tagMarkerBrushHatchStyles
{
   MARKER_HS_BDIAGONAL = 1,
   MARKER_HS_CROSS = 2
   MARKER_HS_DIAGCROSS = 3
   MARKER_HS_FDIAGONAL = 4
   MARKER_HS_HORIZONTAL = 5,
   MARKER_HS_VERTICAL = 6
} MarkerBrushHatchStyles;

Comments

The MarkerBrushHatchStyles data type provides all the brush hatch styles used for drawing markers.


MarkerBrushStyles

typedef enum tagMarkerBrushStyles
{
   MARKER_BS_SOLID = 0,
   MARKER_BS_NULL = 1,
   MARKER_BS_HOLLOW = 1
   MARKER_BS_HATCHED = 2
   MARKER_BS_PATTERN = 3
} MarkerBrushStyles;

Comments

The MarkerBrushStyles data type provides all the brush styles used for drawing markers.


MarkerPenStyles

typedef enum tagMarkerPenStyles
{
   MARKER_PS_SOLID = 0,
   MARKER_PS_DASH = 1,
   MARKER_PS_DOT = 2
   MARKER_PS_DASHDOT = 3
   MARKER_PS_DASHDOTDOT = 4
   MARKER_PS_NULL = 5
   MARKER_PS_INSIDEFRAME = 6
} MarkerPenStyles;

Comments

The MarkerPenStyles data type provides all the pen styles used for drawing markers.


VectorObjectType

typedef enum tagVectorObjectType
{
   VECTOR_OBJECT = 0,
   VECTOR_VERTEX = 1,
   VECTOR_LINE = 2
   VECTOR_RECTANGLE = 3
   VECTOR_POLYLINE = 4
   VECTOR_POLYBEZIER = 5
   VECTOR_POLYGON = 6
   VECTOR_ELLIPSE = 7
   VECTOR_CIRCLE = 8
   VECTOR_ARC = 9
   VECTOR_ELLIPTICALARC = 10
   VECTOR_TEXT = 11
   VECTOR_PIE = 12
   VECTOR_CHORD = 13
   VECTOR_POLYDRAW = 14
   VECTOR_RASTER = 15
   VECTOR_STOCK = 16
   VECTOR_CLONE = 17
   VECTOR_HPOLYBEZIER = 18
   VECTOR_SPLINE = 19

} VectorObjectType;

Comments

The VectorObjectType provides all the vector types supported by LEADTOOLS.


VectorPointType

typedef enum tagVectorPointType
{
   VECTOR_PT_CLOSEFIGURE   =   0x01,
   VECTOR_PT_LINETO        =   0x02,
   VECTOR_PT_BEZIERTO      =   0x04,
   VECTOR_PT_MOVETO        =   0x06,
} VectorPointType;

Comments

The VectorPointType data type is used to specify how each point in the object is used. The values given above behave like the PT_MOVETO, PT_LINETO, PT_BEZIERTO and PT_CLOSEFIGURE values under PolyDraw in the Microsoft SDK. For a more detailed explanation, refer to the Microsoft SDK documentation.


VectorROPCode

typedef enum tagVectorROPCode
{
   VECTOR_R2_BLACK = 1,
   VECTOR_R2_NOTMERGEPEN = 2,
   VECTOR_R2_MASKNOTPEN = 3,
   VECTOR_R2_NOTCOPYPEN = 4,
   VECTOR_R2_MASKPENNOT = 5,
   VECTOR_R2_NOT = 6,
   VECTOR_R2_XORPEN = 7,
   VECTOR_R2_NOTMASKPEN = 8,
   VECTOR_R2_MASKPEN = 9,
   VECTOR_R2_NOTXORPEN = 10,
   VECTOR_R2_NOP = 11,
   VECTOR_R2_MERGENOTPEN = 12,
   VECTOR_R2_COPYPEN = 13,
   VECTOR_R2_MERGEPENNOT = 14,
   VECTOR_R2_MERGEPEN = 15,
   VECTOR_R2_WHITE = 16,
} VectorROPCode;

Comments

The VectorROPCode provides all the ROP code types values used to draw vector objects in the LEADTOOLS toolkit.


Vector Interfaces

LEADTOOLS provides the following vector interfaces for working with vector layers, groups and objects:

ILEADVectorGroup

ILEADVectorObject

ILEADVectorLayer


ILEADVectorObject

The ILEADVectorObject serves as a handle to a vector object, providing properties that describe the vector object and methods used to manipulate the object.

Properties:

Property Name	Data Type	Description	Examples
Type	VectorObjectType	(Read only) The vector object type. For a list of possible values, refer to VectorObjectType.	Visual Basic Example  Visual C++ 4.0 Example
ID	long	(Read only) Vector object ID.	Visual Basic Example  Visual C++ 4.0 Example
UserTag	long	The user defined tag associated with the vector object, if one exists. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
ROP	VectorROPCode	The ROP code for the vector object. For a list of possible values, refer to VectorROPCode. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
hObject	long	(Read only) Gets the handle to the vector object.	Visual Basic Example  Visual C++ 4.0 Example
Layer	long	(Read only) Gets the ID of the vector layer in which the object is located.	Visual Basic Example  Visual C++ 4.0 Example
PointCount	long	The number of points in the object. This depends on the type. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
PointType (long nIndex)	VectorPointType	Type of point in the object. For each point in the object there is one PointType. This property is valid only for objects of type VECTOR_POLYDRAW. For a list of possible point types, refer to VectorPointType. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
X (nIndex)	double	X coordinate of the specified point in the object. This property is valid for the following object types: Object Type Max. nIndex VECTOR_ARC 0 VECTOR_CHORD 0 VECTOR_CIRCLE 0 VECTOR_CLONE 0 VECTOR_ELLIPSE 0 VECTOR_ELLIPTICALARC 0 VECTOR_LINE 1 VECTOR_PIE 0 VECTOR_POLYBEZIER PointCount -1 VECTOR_POLYDRAW PointCount -1 VECTOR_POLYGON PointCount -1 VECTOR_POLYLINE PointCount –1 VECTOR_RASTER 1 VECTOR_RECTANGLE 1 VECTOR_STOCK 1 VECTOR_TEXT 0 VECTOR_VERTEX 0 If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Y (nIndex)	double	Y coordinate of the specified point in the object.This property is valid for the same object types listed in the X property above. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Z (nIndex)	double	Z coordinate of the specified point in the object. This property is valid for the same object types listed in the X property above. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
PolyFillMode	short	Flag that indicates how to handle complex crossing lines. This property is valid only for the following object type VECTOR_POLYGON. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. The following are valid values, which are illustrated below: Value Meaning VECTOR_POLY_WINDING [0] All pixels that are inside the resulting exterior lines are in the region. VECTOR_POLY_ALTERNATE [1] The region includes the area between odd-numbered and even-numbered polygon sides on each scan line.	Visual Basic Example  Visual C++ 4.0 Example
RadiusX	double	Radius along the X axis. For a list of valid object types, refer to RadiusY below. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
RadiusY	double	Radius along the Y axis. The RadiusX and RadiusY properties are valid for the following object types: Value Meaning VECTOR_ELLIPSE Note: For an Ellipse you must set both properties. VECTOR_CIRCLE Note: For a Circle, both properties will return the same value when read.  When set, you only need to set one. VECTOR_ARC Note: For an Arc, both properties will return the same value when read.  When set, you only need to set one. VECTOR_ELLIPTICALARC Note: For an Elliptical Arc, both properties must be set. VECTOR_PIE Note: For a Pie section, both properties will return the same value when read.  When set, you only need to set one. VECTOR_CHORD Note: For Chord, both properties will return the same value when read.  When set, you only need to set one. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
StartAngle	double	The angle at which to begin the object. Values should be between 0 and 360 degrees. Values less than 0 and greater than 360 will be modified internally. This property is valid for the following object types: VECTOR_ARC VECTOR_ELLIPTICALARC VECTOR_PIE VECTOR_CHORD If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
SweepAngle	double	The angle through which to sweep the vector arc. Values should be between –360 and +360 degrees. Positive angles will be drawn in a counter-clockwise direction from StartAngle. Negative angles will be drawn in a clockwise direction. This property is valid for the same object types listed in the StartAngle property. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Text	BSTR	String that contains the text associated with the vector object. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Flags	long	Flag that controls certain characteristics of Text objects and Clone objects.  This property is valid for the object type VECTOR_TEXT, VECTOR_CLONE or VECTOR_SPLINE. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning VECTOR_TEXT_LEFT [0] Align text to the left of the insertion point. VECTOR_TEXT_RIGHT [1] Align text to the right of the insertion point. VECTOR_TEXT_HCENTER [2] Center text horizontally on the insertion point. VECTOR_TEXT_TOP [0] Align text to the top of the insertion point. VECTOR_TEXT_BOTTOM [4] Align text to the bottom of the insertion point. VECTOR_TEXT_VCENTER [8] Center text vertically on the insertion point. VECTOR_TEXT_HITTESTRECT [16] Perform hit text on the bounding rectangle, not just the text characters. VECTOR_CLONE_USE_PEN [1] Use the original object's pen to draw the clone. VECTOR_CLONE_USE_BRUSH [2] Use the original object's brush to draw the clone. VECTOR_CLONE_USE_POINT_AS_ORIGIN [4] Use the X, Y and Z propeties as the origin point when performing Scaling and Rotation. If this flag is not specified, the Scaling and Rotation will be performed around the accumulative center of all objects inside the group. VECTOR_SPLINE_FITPOINTS [0] Draw the spline using the fit point method. VECTOR_SPLINE_CONTROLPOINTS [32] Draw the spline using the contol point method.	Visual Basic Example  Visual C++ 4.0 Example
CharHeight	double	Height in physical units of a single character. Note if this property is 0, the toolkit will use the height of the font used instead. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
CharWidth	double	Width in physical units of a single character. Note if this property is 0, the toolkit will use a suitable width for the given height. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontHeight	long	Height of the font used by the object. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontWidth	long	Width of the font used by the object. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontOrientation	long	Orientation of the font used by the object. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontEscapement	long	Escapement of the font used by the object. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontUnderline	VARIANT_BOOL	Flag that indicates whether the font is underlined. This property is valid for object type VECTOR_TEXT.  If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning TRUE The font is underlined. FALSE The font is not underlined.	Visual Basic Example  Visual C++ 4.0 Example
FontItalic	VARIANT_BOOL	Flag that indicates whether the font is italicized. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning TRUE The font is italicized. FALSE The font is not italicized.	Visual Basic Example  Visual C++ 4.0 Example
FontStrikeOut	VARIANT_BOOL	Flag that indicates whether the font has a strike-out through it. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning TRUE The font has a strike-out through it. FALSE The font does not have underlined a strike-out through it.	Visual Basic Example  Visual C++ 4.0 Example
FontFaceName	BSTR	Face name of the font used by the object. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontPitchAndFamily	short	Pitch and family of the font used by the object. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontQuality	short	Quality of the font used by the object. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontClipPrecision	short	Clip precision of the font used by the object. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontOutPrecision	short	Out precision of the font used by the object. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
FontCharSet	short	Character set of the font used by the object. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Bitmap	long	Handle to a bitmap used by the object. This property is valid for object type VECTOR_RASTER. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
StockID	long	Stock object ID in its DLL. The documentation for the stock object DLL should include valid object IDs.	Visual Basic Example  Visual C++ 4.0 Example
hDllInst	long	Instance handle of the stock object DLL. This can be NULL only if DllName is not NULL.	Visual Basic Example  Visual C++ 4.0 Example
DllName	BSTR	Character string that contains the name of the stock object DLL. This can be NULL only if hDllInst is not NULL. Set this property to "" (empty string) to have LEADTOOLS use the hDllInst property, or, set this property to the name of the dll to use. This property is valid for the object type VECTOR_STOCK.	Visual Basic Example  Visual C++ 4.0 Example
Selected	BOOL	Flag that indicates whether the object is selected. This property is not supported in the DirectX engine, and will always return FALSE. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning TRUE The object is currently selected. FALSE The object is not currently selected.	Visual Basic Example  Visual C++ 4.0 Example
Hidden	BOOL	Flag that indicates whether the object is hidden. This property is not supported in the DirectX engine, and will always return FALSE. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning TRUE The object is currently hidden. FALSE The object is not currently hidden.	Visual Basic Example  Visual C++ 4.0 Example
ScaleX	double	Scale setting for the X axis of a VECTOR_CLONE object. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
ScaleY	double	Scale setting for the Y axis of a VECTOR_CLONE object. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
ScaleZ	double	Scale setting for the Z axis of a VECTOR_CLONE object. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
RotationX	double	Rotation setting for the X axis of a VECTOR_CLONE object. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
RotationY	double	Rotation setting for the Y axis of a VECTOR_CLONE object. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
RotationZ	double	Rotation setting for the Z axis of a VECTOR_CLONE object. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
CloneGroup	long	The id of the group from which the clone object was created. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Tooltip	BSTR	String that contains the object's tool tip text	Visual Basic Example  Visual C++ 4.0 Example
TooltipPenStyle	Long	Pen style used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipPenWidth	long	Pen width used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipPenColor	OLE_COLOR	Pen color used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipBrushStyle	long	Brush style used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipBrushColor	OLE_COLOR	Brush color used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipBrushHatch	long	Brush hatch used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontHeight	long	Font height used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontUnderline	VARIANT_BOOL	Flag that indicates whether the font used for the tooltip will be underlined. Possible values are: Value Meaning TRUE The font will be underlined. FALSE The font will not be underlined.	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontItalic	VARIANT_BOOL	Flag that indicates whether the font used for the tooltip will be italic. Possible values are: Value Meaning TRUE The font will be italic. FALSE The font will not be italic.	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontOrientation	long	Font orientation used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontEscapement	long	Font escapement used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontWidth	long	Font width used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontFaceName	BSTR	Font name used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontPitchAndFamily	short	Font family and pitch used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontQuality	short	Font quality used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontClipPrecision	short	Font clipping precision used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontOutPrecision	short	Font out precision used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontCharSet	short	Font character set used to display the object's tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipFontStrikeOut	VARIANT_BOOL	Flag that indicates whether the font used for the tooltip will have a strike-through. Possible values are: Value Meaning TRUE The font will have a strike-through. FALSE The font will not have a strike-through.	Visual Basic Example  Visual C++ 4.0 Example
TooltipPointX	long	X coordinate of the insertion point for the tool tip	Visual Basic Example  Visual C++ 4.0 Example
TooltipPointY	long	Y coordinate of the insertion point for the tool tip	Visual Basic Example  Visual C++ 4.0 Example
Description	BSTR	String that may contain user-defined information about the object.	Visual Basic Example  Visual C++ 4.0 Example
ViewContext	VARIANT_BOOL	Flag that indicates whether to set or remove the view context. Possible values are: Value Meaning TRUE Set the view context. FALSE Remove the view context.	Visual Basic Example  Visual C++ 4.0 Example
ViewContextMinX	double	Minimum X value for the object view context	Visual Basic Example  Visual C++ 4.0 Example
ViewContextMinY	double	Minimum Y value for the object view context	Visual Basic Example  Visual C++ 4.0 Example
ViewContextMinZ	double	Minimum Z value for the object view context	Visual Basic Example  Visual C++ 4.0 Example
ViewContextMaxX	double	Maximum X value for the object view context	Visual Basic Example  Visual C++ 4.0 Example
ViewContextMaxY	double	Maximum Y value for the object view context	Visual Basic Example  Visual C++ 4.0 Example
ViewContextMaxZ	double	Maximum Z value for the object view context	Visual Basic Example  Visual C++ 4.0 Example
Object	long	(Read only) Long value that can be used to get more information about the object	Visual Basic Example  Visual C++ 4.0 Example
HyperlinkCount	long	(Read only) Number of targets in the hyperlink target list for the object.	Visual Basic Example  Visual C++ 4.0 Example
BrushStyle	VectorBrushStyles	Brush Style is used to decide the brush type used to draw the object. This property is valid for the following object types: VECTOR_RECTANGLE VECTOR_POLYGON VECTOR_ELLIPSE VECTOR_TEXT VECTOR_PIE VECTOR_CHORD VECTOR_POLYDRAW VECTOR_STOCK VECTOR_CLONE	Visual Basic Example  Visual C++ 4.0 Example
StandardBrushColor	OLECOLOR	Color of the standard brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_STANDARD. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
StandardBrushStyle	long	Style of the standard brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_STANDARD. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
StandardBrushHatch	long	Hatch of the standard brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_STANDARD. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushStyle	VectorHatchBrushStyles	Style of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPenColor	OLECOLOR	Color of the hatch brush pen used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPenStyle	long	Style of the hatch brush pen used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPenWidth	long	Width of the hatch brush pen used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushBrushStyle	long	Style of the hatch brush’s brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushBrushColor	OLECOLOR	Color of the hatch brush’s brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushBrushHatch	long	Hatch of the hatch brush’s brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushStepSize	long	Step size of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushLineRotation	double	Line rotation of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushFlags	long	Flags of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPointCount	long	Number of points of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPointX(nIndex)	long	PointX of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPointY(nIndex)	long	PointY of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
PatternBrushBitmap	long	Bitmap of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushStartColor	OLECOLOR	Start color of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushEndColor	OLECOLOR	End color of the hatch brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushSteps	long	Steps of the gradient brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushStyle	VectorGradientBrushStyles	Style of the gradient brush used to draw the object, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
EnableExtendedPen	VARIANT_BOOL	EnableExtendedPen is used to decide the pen type used to draw the object. This property is valid for the following object types: VECTOR_ARC VECTOR_CHORD VECTOR_CIRCLE VECTOR_CLONE VECTOR_ELLIPSE VECTOR_ELLIPTICALARC VECTOR_LINE VECTOR_PIE VECTOR_POLYBEZIER VECTOR_POLYDRAW VECTOR_POLYGON VECTOR_POLYLINE VECTOR_RECTANGLE VECTOR_STOCK VECTOR_TEXT VECTOR_VERTEX VECTOR_HPOLYBEZIER VECTOR_SPLINE	Visual Basic Example  Visual C++ 4.0 Example
LogicalPenColor	OLECOLOR	Color of the logical pen used to draw the object, if EnableExtendedPen is set to FALSE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
LogicalPenStyle	long	Style of the logical pen used to draw the object, if EnableExtendedPen is set to FALSE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
LogicalPenWidth	long	Width of the logical pen used to draw the object, if EnableExtendedPen is set to FALSE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenStyle	long	Style of the extended logical pen used to draw the object, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenWidth	long	Width of the extended logical pen used to draw the object, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenBrushStyle	long	Style of the extended logical pen brush used to draw the object, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenColor	OLECOLOR	Color of the extended logical pen used to draw the object, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenHatch	long	Hatch of the extended logical pen used to draw the object, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenEntriesNumber	long	Number of custom extended logical pen styles used to draw the object, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenEntries(nIndex)	long	Custom extended logical pen style entries used to draw the object, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
SectionsNumber(nIndex)	long	Number of sections in the objects of the type VECTOR_HPOLYBEZIER.	Visual Basic Example  Visual C++ 4.0 Example
Degree	long	Degree of the objects of the type VECTOR_HPOLYBEZIER.	Visual Basic Example  Visual C++ 4.0 Example
Methods:

Syntax	Return Value	Remarks	Examples
Delete (void);	short	Deletes this vector object. This method is available in the LEADTOOLS Vector Imaging Pro Toolkit. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.	Visual Basic Example Visual C++ 4.0 Example
Explode (void);	short	Explodes this vector object into smaller parts. This method is available in the LEADTOOLS Vector Imaging Pro Toolkit. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED. In the Comments section below is a list of object types and the objects into which they explode.	Visual Basic Example Visual C++ 4.0 Example
Insert ( long nLayerIndex );	short	Inserts this vector object into the layer at the specified index. Pass -1 to specify the current Active Layer. This method is available in the LEADTOOLS Vector Imaging Pro Toolkit. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.	Visual Basic Example Visual C++ 4.0 Example
InsertInGroup (long nGroupIndex);	short	Inserts this vector object into the group at the specified index. This method is available in the LEADTOOLS Vector Imaging Pro Toolkit. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.	Visual Basic Example Visual C++ 4.0 Example
IsInsideRect (double fLeft, double fTop, double fWidth, double fHeight)	BOOL	Determines whether or not this vector object is within the specified rectangle.	Visual Basic Example Visual C++ 4.0 Example
IsInsideParallelogram (double x1, double y1, double z1, double x2, double y2, double z2)	BOOL	Determines whether or not this vector object is within the specified parallelogram.	Visual Basic Example Visual C++ 4.0 Example
AddHyperlinkObject(ILEADVectorObject *pTargetObject,  VARIANT_BOOL bCurrentWindow)	void	Adds a vector object target to the target list for this hyperlinked vector object.	Visual Basic Example Visual C++ 4.0 Example
AddHyperlinkFile(BSTR szTargetPath, long hwndParent)	Void	Adds a file target to the target list of this hyperlinked vector object.	Visual Basic Example Visual C++ 4.0 Example
SetHyperlinkObject(long nIndex, ILEADVectorObject *pTargetObject, VARIANT_BOOL bCurrentWindow)	void	Sets a vector object target in the target list of this hyperlinked vector object.	Visual Basic Example Visual C++ 4.0 Example
SetHyperlinkFile(long nIndex, BSTR szTargetPath, long hwndParent)	void	Sets a target file for this hyperlinked vector object. An object may have more than one target. A hyperlinked vector object can be assigned a target file.  The vector toolkit opens the specified file whenever the end-user clicks on the hyperlinked vector object. Currently, clicking an object is the only event available.	Visual Basic Example Visual C++ 4.0 Example
GotoHyperlink(long nIndex)	void	Activates the target at the specified index in the target list of the hyperlinked vector object.	Visual Basic Example Visual C++ 4.0 Example
GetHyperlink(long nIndex,  VARIANT_BOOL *pbObject,  int *pnID, VARIANT_BOOL *pbNewWindow, BSTR *pTargetFile, long *phwndParent)	void	Gets information about a specific target in the target list of a hyperlinked vector object.	Visual Basic Example Visual C++ 4.0 Example
ShowTooltip(VARIANT_BOOL bShow)	Void	Shows or hides the tooltip of the object.	Visual Basic Example Visual C++ 4.0 Example
Comments on ILEADVectorObject

When an object is exploded, using ILEADVectorObject::Explode, the following objects can result:

Object type	After Explode

VECTOR_VERTEX	Same.

VECTOR_LINE	Same.

VECTOR_RECTANGLE	4 VECTOR_LINEs.

VECTOR_POLYLINE	nPointCount VECTOR_LINEs.

VECTOR_POLYBEZIER	( (nPointCount + 2) / 3 ) - 1 VECTOR_POLYBEZIERs.

VECTOR_POLYGON	nPointCount + 1 VECTOR_LINEs

VECTOR_ELLIPSE	Same.

VECTOR_CIRCLE	Same.

VECTOR_ARC	Same.

VECTOR_ELLIPTICALARC	Same.

VECTOR_TEXT	Same.

VECTOR_PIE	Same.

VECTOR_CHORD	Same.

VECTOR_POLYDRAW	VECTOR_LINEs and VECTOR_POLYBEZIERs.

VECTOR_RASTER	Same.

VECTOR_CLONE	The objects inside the group will be added to the vector handle.

VECTOR_SPLINE	VECTOR_LINEs.

VECTOR_HPOLYBEZIER	VECTOR_LINEs.

The diagram below gives a graphical representation of the Radius, StartAngle, SweepAngle and X, Y and Z properties.

Either hDllInst or DllName can be NULL. They cannot both be NULL. If hDllInst is not NULL, the toolkit will load the requested object from this DLL handle. If hDllInst is NULL, the toolkit will assume that DllName indicates the complete path to the requested library.


nIndex Parameter of PointType
nIndex

Index of the point in the object. nIndex must be between 0 and PointCount - 1.


nIndex Parameter of X
nIndex

Index of the point in the object.


nIndex Parameter of Y
nIndex

Index of the point in the object.


nIndex Parameter of Z
nIndex

Index of the point in the object.


nLayerIndex Parameter of Insert method
nLayerIndex

Index of the layer in which to insert the object.


fLeft Parameter of IsInsideRect method
fLeft

The X coordinate of the origin of the rectangle.


fTop Parameter of IsInsideRect method
fTop

The Y coordinate of the origin of the rectangle.


fWidth Parameter of IsInsideRect method
fWidth

The width of the rectangle.


fHeight Parameter of IsInsideRect method
fHeight

The height of the rectangle.


x1 Parameter of IsInsideParallelogram method
x1

X coordinate of the minimum point of the parallelogram.


y1 Parameter of IsInsideParallelogram method
y1

Y coordinate of the minimum point of the parallelogram.


z1 Parameter of IsInsideParallelogram method
z1

Z coordinate of the minimum point of the parallelogram.


x2 Parameter of IsInsideParallelogram method
x2

X coordinate of the maximum point of the parallelogram.


y2 Parameter of IsInsideParallelogram method
y2

Y coordinate of the maximum point of the parallelogram.


z2 Parameter of IsInsideParallelogram method
z2

Z coordinate of the maximum point of the parallelogram.


nGroupIndex Parameter of InsertInGroup method
nGroupIndex

Index of the group in which to insert the object.


pTargetObject Parameter of AddHyperlinkObject method
pTargetObject

Pointer to an ILEADVectorObject that references a vector object target to add. The target list of this hyperlinked vector object will be updated with the new target.


bCurrentWindow Parameter of AddHyperlinkObject method
bCurrentWindow

Specifies whether to display the target object in the current window or in a new window.  Possible values are:

Value	Meaning

TRUE	Displays the target object in the current window.

FALSE	Displays the target object in a new window.


szTargetPath Parameter of AddHyperlinkFile method
szTargetPath

Character string that contains the name and path of the target file to add. The target list of this hyperlinked vector object will be updated with the new target.


hwndParent Parameter of AddHyperlinkFile method
hwndParent

Handle to the parent window, which will host the new application that will start when the hyperlinked vector object is clicked.


nIndex Parameter of SetHyperlinkObject method
nIndex

Index to the target item that will be set


pTargetObject Parameter of SetHyperlinkObject method
pTargetObject

Pointer to an ILEADVectorObject that contains the information on the new target object to set.


bCurrentWindow Parameter of SetHyperlinkObject method
bCurrentWindow

Specifies whether to display the target object in the current window or in a new window.  Possible values are:

Value	Meaning

TRUE	Displays the target object in the current window.

FALSE	Displays the target object in a new window.


nIndex Parameter of SetHyperlinkFile method
nIndex

Index to the target item that will be set


SetHyperlinkFile Parameter of szTargetPath method
szTargetPath

Character string that contains the name and path of the target file to set. The target list of this hyperlinked vector object will be updated with the new target.


hwndParent Parameter of SetHyperlinkFile method
hwndParent

Handle to the parent window, which will host the new application that will start when the hyperlinked vector object is clicked.


nIndex Parameter of GotoHyperlink method
nIndex

Index to an item in the target list. The target specified by this index will be activated.


nIndex Parameter of GetHyperlink method
nIndex

Index in the target list


pbObject Parameter of GetHyperlink method
pbObject

Flag that indicates whether the vector object will be displayed or information about the target will be activated when the hyperlinked vector object is clicked. Possible values are:

Value	Meaning

TRUE	A vector object will be displayed when the hyperlinked vector object is clicked.

FALSE	Only information about the target will be displayed when the hyperlinked vector object is clicked.


pnID Parameter of GetHyperlink method
pnID

Id of the target in the target list.


pbNewWindow Parameter of GetHyperlink method
pbNewWindow

Specifies whether to display the target object in a new window or in the current window.  Possible values are:

Value	Meaning

TRUE	Displays the target object in a new window.

FALSE	Displays the target object in the current window.


pTargetFile Parameter of GetHyperlink method
pTargetFile

Character string that contains the URL for the file that will be opened when the hyperlinked vector object is clicked.


phwndParent Parameter of GetHyperlink method
phwndParent

Handle to the parent window which will host the new application that will start when the hyperlinked vector object is clicked.


bShow Parameter of ShowTooltip method
bShow

Specifies whether to show or hide the object’s tooltip.  Possible values are:

Setting	Description

TRUE	Shows the tooltip.

FALSE	Hides the tooltip.


Return for Delete method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for Explode method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for Insert method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for IsInsideRect method
Return Value

Return	Meaning

TRUE	The object is inside the specified rectangle.

FALSE	The object is not inside the specified rectangle.


Return for IsInsideParallelogram method
Return Value

Return	Meaning

TRUE	The object is inside the specified parallelogram.

FALSE	The object is not inside the specified parallelogram.


Return for InsertInGroup method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ILEADVectorGroup

The ILEADVectorGroup serves as a handle to a vector group, providing properties that describe the vector group and methods used to manipulate the group.

Properties:

Property Name	Data Type	Description	Examples
ID	long	(Read only) Vector group ID.	Visual Basic Example  Visual C++ 4.0 Example
Name	BSTR	String that contains the name of the group. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
UserTag	long	The user defined tag associated with the vector group, if one exists. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Methods:

Syntax	Return Value	Remarks	Examples
Delete(void)	short	Deletes the group from the current vector handle. This method is available in the LEADTOOLS Vector Imaging Pro Toolkit. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.	Visual Basic Example  Visual C++ 4.0 Example
DeleteClones(long nFlags)	short	Deletes all clones of this group from the vector handle. This method is available in the LEADTOOLS Vector Imaging Pro Toolkit. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.	Visual Basic Example  Visual C++ 4.0 Example
Empty(void)	short	Empties the group of all vector objects. This method is available in the LEADTOOLS Vector Imaging Pro Toolkit. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.	Visual Basic Example  Visual C++ 4.0 Example
EnumObjects(short nFlag)	short	Enumerates the objects within the group.	Visual Basic Example  Visual C++ 4.0 Example


nFlags Parameter of DeleteClones method
nFlags

Flag that indicates which clones to delete. Possible values are::

Value	Meaning

0	Delete all clones.

VECTOR_FLAGS_SELECTED_ONLY	Delete only the currently selected clones within the vector handle.


nFlag Parameter of EnumObjects method
nFlag

Flag that indicates which objects to enumerate. Possible values are:

Value	Meaning

0	Enumerate all objects in the group.

VECTOR_FLAGS_SELECTED_ONLY	Enumerate only selected objects in the group.


Return for Delete method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for DeleteClones method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for Empty method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for EnumObjects method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


ILEADVectorLayer

The ILEADVectorLayer serves as a handle to a vector layer, providing properties that describe the vector layer and methods used to manipulate the layer.

Properties:

Property name	Data type	Description	Examples
ID	long	(Read only) Vector layer ID.	Visual Basic Example  Visual C++ 4.0 Example
Name	BSTR	String that contains the name of the layer. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	Visual Basic Example  Visual C++ 4.0 Example
Visible	VARIANT_BOOL	Flag that indicates whether or not the layer is visible. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning TRUE The layer is visible. FALSE The layer is not visible.	Visual Basic Example  Visual C++ 4.0 Example
Locked	VARIANT_BOOL	Flag that indicates whether or not the layer is locked. A layer cannot be edited if it is locked. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only. Possible values are: Value Meaning TRUE The layer is locked. FALSE The layer is not locked.	Visual Basic Example  Visual C++ 4.0 Example
UserTag	long	User-defined tag associated with the vector layer. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this will be read only.	User-defined tag associated with the vector layer.

Methods:

short Delete (void)

Visual Basic Example   Visual C++ 4.0 Example

Remarks

(Vector Imaging Pro Only) Delete the vector layer. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.

short Empty (void)

Visual Basic Example   Visual C++ 4.0 Example

Remarks

(Vector Imaging Pro Only) Empties the vector layer of all objects. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.

short SetActive (void)

Visual Basic Example   Visual C++ 4.0 Example

Remarks

(Vector Imaging Pro Only) Sets the vector layer as the active layer. If vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, this method will return ERROR_VECTOR_LOCKED.

short EnumObjects (short nFlag)

Visual Basic Example   Visual C++ 4.0 Example

Remarks

Enumerates all objects within the layer.


nFlag Parameter of EnumObjects method
nFlag

Flag that indicates which objects to enumerate. Possible values are:

Value	Meaning

0	Enumerate all objects within the vector layer.

VECTOR_FLAGS_SELECTED_ONLY	Enumerate only the selected objects.


Return for Delete method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for Empty method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for SetActive method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


Return for EnumObjects method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes


Automation / Container Interfaces

LEADTOOLS provides two vector interfaces for working with vector automation and container objects. These are:

ILTVectorAutomation

ILTVectorContainer


ILTVectorAutomation

The ILTVectorAutomation serves as a handle to a vector automation object, providing properties that describe the vector automation object.

Properties:

Property Name	Data Type	Description	Examples
FontHeight	long	Height of the font used in Automation mode when drawing vector text objects. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation.	Visual Basic Example Visual C++ 4.0 Example
FontWidth	long	Width of the font used in Automation mode when drawing vector text objects. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation.	Visual Basic Example Visual C++ 4.0 Example
FontWeight	long	Weight of the font used in Automation mode when drawing vector text objects. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation.	Visual Basic Example Visual C++ 4.0 Example
FontOrientation	long	Orientation of the font used in Automation mode when drawing vector text objects. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation.	Visual Basic Example Visual C++ 4.0 Example
FontEscapement	long	Escapement of the font used in Automation mode when drawing vector text objects. This property is valid for object type VECTOR_TEXT. For more information about this property, consult LOGFONT in the Microsoft SDK documentation.	Visual Basic Example Visual C++ 4.0 Example
FontUnderline	VARIANT_BOOL	Flag that indicates whether the font used in Automation mode when drawing vector text objects is underlined. This property is valid for object type VECTOR_TEXT. Possible values are: Value Meaning TRUE The font is underlined. FALSE The font is not underlined.	Visual Basic Example Visual C++ 4.0 Example
FontItalic	VARIANT_BOOL	Flag that indicates whether the font used in Automation mode when drawing vector text objects is italicized. This property is valid for object type VECTOR_TEXT. Possible values are: Value Meaning TRUE The font is italicized. FALSE The font is not italicized.	Visual Basic Example Visual C++ 4.0 Example
FontStrikeOut	VARIANT_BOOL	Flag that indicates whether the font used in Automation mode when drawing vector text objects has a strike-out through it. This property is valid for object type VECTOR_TEXT. Possible values are: Value Meaning TRUE The font has a strike-out through it. FALSE The font does not have underlined a strike-out through it.	Visual Basic Example Visual C++ 4.0 Example
FontFaceName	BSTR	Face name of the font used in Automation mode when drawing vector text objects. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT.	Visual Basic Example Visual C++ 4.0 Example
FontPitchAndFamily	short	Pitch and family of the font used in Automation mode when drawing vector text objects. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT.	Visual Basic Example Visual C++ 4.0 Example
FontQuality	short	Quality of the font used in Automation mode when drawing vector text objects. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT.	Visual Basic Example Visual C++ 4.0 Example
FontClipPrecision	short	Clip precision of the font used in Automation mode when drawing vector text objects. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT.	Visual Basic Example Visual C++ 4.0 Example
FontOutPrecision	short	Out precision of the font used in Automation mode when drawing vector text objects. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT.	Visual Basic Example Visual C++ 4.0 Example
FontCharSet	short	Character set of the font used in Automation mode when drawing vector text objects. For more information about this property, consult LOGFONT in the Microsoft SDK documentation. This property is valid for object type VECTOR_TEXT.	Visual Basic Example Visual C++ 4.0 Example
CurrentTool	long	(Runtime only) Gets or sets the Automation Tool, without using the LEAD Toolbar control.	Visual Basic Example Visual C++ 4.0 Example
BrushStyle	VectorBrushStyles	Brush Style is used to decide the brush type used in Automation mode to draw vector objects. This property is valid for the following object types: VECTOR_RECTANGLE VECTOR_POLYGON VECTOR_ELLIPSE VECTOR_TEXT VECTOR_PIE VECTOR_CHORD VECTOR_POLYDRAW VECTOR_STOCK VECTOR_CLONE	Visual Basic Example  Visual C++ 4.0 Example
StandardBrushColor	OLECOLOR	Color of the standard brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_STANDARD. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
StandardBrushStyle	long	Style of the standard brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_STANDARD. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
StandardBrushHatch	long	Hatch of the standard brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_STANDARD. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushStyle	VectorHatchBrushStyles	Style of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPenColor	OLECOLOR	Color of the hatch brush pen used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPenStyle	long	Style of the hatch brush pen used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPenWidth	long	Width of the hatch brush pen used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushBrushStyle	long	Style of the hatch brush’s brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushBrushColor	OLECOLOR	Color of the hatch brush’s brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushBrushHatch	long	Hatch of the hatch brush’s brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushStepSize	long	Step size of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushLineRotation	double	Line rotation of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushFlags	long	Flags of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPointCount	long	Number of points of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPointX(nIndex)	long	PointX of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
HatchBrushPointY(nIndex)	long	PointY of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
PatternBrushBitmap	long	Bitmap of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_HATCH. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushStartColor	OLECOLOR	Start color of the hatch brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushEndColor	OLECOLOR	End color of the hatch brush used in Automation mode to draw vector object, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushSteps	long	Steps of the gradient brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
GradientBrushStyle	VectorGradientBrushStyles	Style of the gradient brush used in Automation mode to draw vector objects, if BrushStyle is set to VECTOR_BRUSH_GRADIENT. This property is valid for the same object types listed in the BrushStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
EnableExtendedPen	VARIANT_BOOL	EnableExtendedPen is used to decide the pen type used in Automation mode to draw vector objects. This property is valid for the following object types: VECTOR_ARC VECTOR_CHORD VECTOR_CIRCLE VECTOR_CLONE VECTOR_ELLIPSE VECTOR_ELLIPTICALARC VECTOR_LINE VECTOR_PIE VECTOR_POLYBEZIER VECTOR_POLYDRAW VECTOR_POLYGON VECTOR_POLYLINE VECTOR_RECTANGLE VECTOR_STOCK VECTOR_TEXT VECTOR_VERTEX	Visual Basic Example  Visual C++ 4.0 Example
LogicalPenColor	OLECOLOR	Color of the logical pen used in Automation mode to draw vector objects, if EnableExtendedPen is set to FALSE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
LogicalPenStyle	long	Style of the logical pen used in Automation mode to draw vector objects, if EnableExtendedPen is set to FALSE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
LogicalPenWidth	long	Width of the logical pen used in Automation mode to draw vector objects, if EnableExtendedPen is set to FALSE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenStyle	long	Style of the extended logical pen used in Automation mode to draw vector objects, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenWidth	long	Width of the extended logical pen used in Automation mode to draw vector objects, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenBrushStyle	long	Style of the extended logical pen brush used in Automation mode to draw vector objects, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenColor	OLECOLOR	Color of the extended logical pen used in Automation mode to draw vector objects, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenHatch	long	Hatch of the extended logical pen used in Automation mode to draw vector objects, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenEntriesNumber	long	Number of custom extended logical pen styles used in Automation mode to draw vector objects, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
ExtendedLogicalPenEntries(nIndex)	long	Custom extended logical pen style entries used in Automation mode to draw vector objects, if EnableExtendedPen is set to TRUE. This property is valid for the same object types listed in the PenStyle property above.	Visual Basic Example  Visual C++ 4.0 Example
Comments

The current Vector Automation properties can be accessed through the AutomationProps property.


ILTVectorContainer

The ILTVectorContainer serves as a handle to a vector automation container, providing properties that describe the vector automation container and methods used to manipulate it.

Properties:

Property name	Data type	Description	Examples
LimitLeft	long	Left boundary of the vector automation container.	Visual Basic Example  Visual C++ 4.0 Example
LimitTop	long	Top boundary of the vector automation container.	Visual Basic Example  Visual C++ 4.0 Example
LimitWidth	long	Width of the vector automation container.	Visual Basic Example  Visual C++ 4.0 Example
LimitHeight	long	Height of the vector automation container.	Visual Basic Example  Visual C++ 4.0 Example
ObjectCursor (VectorContainerObjectType)	LPPICTUREDISP	Cursor used when drawing the specified vector object type.	Visual Basic Example  Visual C++ 4.0 Example
Enabled	VARIANT_BOOL	Flag that indicates whether to enable or disable the container. Possible values are: Value Meaning TRUE enable the container. FALSE disable the container.	Visual Basic Example  Visual C++ 4.0 Example
BorderColor	OLE_COLOR	Specifies the color of the pen used while drawing an object within the container. The default color is RGB (0, 0, 0).
HandleWidth	Long	Specifies the width, in logical units, of the handle used when editing an object. The default value is 4.
HandleHeight	Long	Specifies the height, in logical units, of the handle used when editing an object. The default value is 4.
HandleColor	OLE_COLOR	Specifies the color of the pen used when drawing the handle. The default color is RGB (0, 0, 0).
EnableHandles	VARIANT_BOOL	Flag that indicate whether the handle used when editing objects within the container is enabled or disabled. Possible values are: Value Meaning TRUE The handle is enabled. (Default) FALSE The handle is disabled.
Method

Short SetActive (void)

Visual Basic Example   Visual C++ 4.0 Example

Remarks

Sets this container as the active container.

Comments

Any point outside the specified boundaries will not be processed.

The ObjectCursor member is an array of cursors that will be shown every time a specific object type is drawn in the container. For example, if a rectangle is being drawn in the container, the cursor set for object type VECTOR_CONTAINER_OBJECT_TYPE_RECT will be displayed. The container makes a copy of the cursor. Therefore, the user can delete a specific cursor.

In order to edit objects in a container, ILTVectorContainer.Enabled must be TRUE.


Return for SetActive method
Return Value

Return	Meaning

0	The function was successful.

<>0	An error occurred. Refer to Error Codes.


VectorContainerObjectType

typedef enum
{
/* predefined object types */
VECTOR_CONTAINER_OBJECT_TYPE_NONE /* selection object */
VECTOR_CONTAINER_OBJECT_TYPE_POINT /* Point object */
VECTOR_CONTAINER_OBJECT_TYPE_LINE /*Line object*/
VECTOR_CONTAINER_OBJECT_TYPE_SQUARE. /*Square object*/
VECTOR_CONTAINER_OBJECT_TYPE_RECT /* Rectangular object */
VECTOR_CONTAINER_OBJECT_TYPE_ELLIPSE /* Elliptical object */
VECTOR_CONTAINER_OBJECT_TYPE_CIRCLE /* Circular object */
VECTOR_CONTAINER_OBJECT_TYPE_POLYLINE /* Polyline object */
VECTOR_CONTAINER_OBJECT_TYPE_BEZIER /* Bezier curve object */
VECTOR_CONTAINER_OBJECT_TYPE_ARC /*Arc object */
VECTOR_CONTAINER_OBJECT_TYPE_TEXT /*Text object */

} VectorContainerObjectType;

The VectorContainerObjectType data type contains the predefined vector container object types.