Display Control Reference 14.1
Events

Functions

void AreaDrag ()
 This event is triggered when a parallelogram is changed in the LB_AREAMODE mode (while the left mouse button is held down).
 
void AreaDraged ()
 This event is triggered when modification of a parallelogram in the LB_AREAMODE mode has finished (the left mouse button has been released).
 
void CSChanged ()
 This event is triggered when a coordinate system is changed in the LB_SETORIGIN mode.
 
void CSClicked ()
 This event is triggered when the user clicks on a coordinate system with the mouse tool.
 
void CVCError (ErrorCode ErrorCode, BSTR ErrorString, boolean *Continue)
 This event is fired if an error occurs in the Display Control. More...
 
void EndDraw ()
 This event is triggered when the overlay drawings are finished.
 
void ImageUpdated ()
 This event is triggered when the image object has changed. This is the case when a new image has been loaded from the hard disk or an image acquisition device driver.
 
void LabelClicked (long ID)
 This event is triggered when there is a click on a label. More...
 
void LabelDrag (long ID)
 This event is triggered when a label is dragged with the mouse. More...
 
void LabelDraged (long ID)
 This event is triggeredhen the left mouse button is released after a label has been dragged with the mouse. More...
 
void LayoutChanged ()
 This event tells the program that the display has changed as a result of zooming or scrolling. More...
 
void OverlayObjectClick (long ID)
 This event is triggered when an overlay object has been clicked with the mouse. More...
 
void OverlayObjectDrag (long ID)
 This event is triggered when an overlay object is dragged. More...
 
void OverlayObjectDraged (long ID)
 This event is triggered when an overlay object was dragged and the left mouse button has been released. More...
 
void RectDrag ()
 This event is triggered when a rectangle is modified in the LB_FRAME mode (while the left mouse button is held down).
 
void RectDraged ()
 This event is triggered when modification of a rectangle the LB_FRAME mode has finished (the left mouse button is pressed again).
 
void RubberDrag (long x0, long y0, long x1, long y1, double distance, double angle)
 Event that is raised while the user drags a rubber band on the display. More...
 
void RubberDragged (long x0, long y0, long x1, long y1, double distance, double angle)
 Event that is raised when the user releases the left mouse button after having dragged a rubber band. More...
 
void UserObjectClick (long ID)
 This event is triggered when a user-defined object is selected by a mouse click. More...
 
void UserObjectDrag (long ID)
 This event is triggered when a user-defined object is dragged. More...
 
void UserObjectDraged (long ID)
 This event is triggered when a user-defined object was dragged and the left mouse button was pressed again. More...
 
void UserPaint (long ID, long NumVertices, __int3264 Vertices, boolean Dragging, __int3264 hDC)
 This event is triggered when a user-defined graphic objects have to be repainted. More...
 

Detailed Description

Function Documentation

◆ CVCError()

void CVCError ( ErrorCode  ErrorCode,
BSTR  ErrorString,
boolean *  Continue 
)

This event is fired if an error occurs in the Display Control.

   For instance an error could occure trying to save an image but the folder is write protected.
Attention
Please include the appropriate header file for your compiler (cvcerror.*).
Parameters
[in]ErrorCodeA unique number describing the error. The following error codes have been defined:
1CVC_E_ERROR
 This error cannot be described more precisely.
2CVC_E_PARAMETER
 Incorrect parameter in a function call.
3CVC_E_FILEIO
 File I/O error, for example while saving or loading an image.
5CVC_E_MEMORY
 Memory could not be allocated.
16CVC_E_NOIMAGE
 No image at all.
17CVC_E_NOINTERFACE
 No interface available.
[in]ErrorStringSpecifies the error text of the output.
[in]ContinueThis specifies whether execution should continue despite the error. The user can overwrite the value in order to change the default action. The default value depends on the function that caused the error.
TRUE specifies that a messate box will appear to inform the user of the error. FALSE means that it is possible to perform custom error handling, e.g. use a self-defined message-box.
Visual Basic Test Code:
The following example shows error handling during saving an image:
Private Sub cvDisp_CVCError(ByVal ErrorCode As CVDISPLAYLib.ErrorCode, ByVal ErrorString As String, Continue As Boolean)
// display error infos
If MsgBox(ErrorString & " Error Code: " & Str$(ErrorCode) & ". Continue?", vbYesNo) = vbYes Then
Continue = True // shows automatically Message Box with Error
Else
Continue = False // does not show automatically the Message Box
EndIf
// checking of error type
If ErrorCode = CVC_E_FILEIO Then // File Open/Save Problems
// Do what you like
labelResult.Caption = "Error - File save " + sFilename
Else
labelResult.Caption = "OK - File save " + sFilename
End
EndIf Sub
@ CVC_E_FILEIO
Definition: CVCError.h:67
Examples:
Visual Basic - VB Fileformats Example

◆ LabelClicked()

void LabelClicked ( long  ID)

This event is triggered when there is a click on a label.

Parameters
[in]IDID of the selected label.

◆ LabelDrag()

void LabelDrag ( long  ID)

This event is triggered when a label is dragged with the mouse.

Parameters
[in]IDID of the selected label.

◆ LabelDraged()

void LabelDraged ( long  ID)

This event is triggeredhen the left mouse button is released after a label has been dragged with the mouse.

Parameters
[in]IDID of the label which has been dragged.

◆ LayoutChanged()

void LayoutChanged ( )

This event tells the program that the display has changed as a result of zooming or scrolling.

Attention
This requires the RightButtonMode property to have been set to RB_MENU or RB_ZOOM.

◆ OverlayObjectClick()

void OverlayObjectClick ( long  ID)

This event is triggered when an overlay object has been clicked with the mouse.

Parameters
[in]IDID of the object that was clicked.
Hints and Notes:
The click event is only available for non dragable Overlay Plug-In objects.
For a distinction between a click on the OPI and real dragging please check the coordinates in the OverlayObjectDraged-Event.

◆ OverlayObjectDrag()

void OverlayObjectDrag ( long  ID)

This event is triggered when an overlay object is dragged.

Parameters
[in]IDID of the object that is being dragged.

◆ OverlayObjectDraged()

void OverlayObjectDraged ( long  ID)

This event is triggered when an overlay object was dragged and the left mouse button has been released.

Parameters
[in]IDID of the object that was dragged.

◆ RubberDrag()

void RubberDrag ( long  x0,
long  y0,
long  x1,
long  y1,
double  distance,
double  angle 
)

Event that is raised while the user drags a rubber band on the display.

Note that you need to have set the display's #LeftBuffonMode property accordingly, otherwise no rubber band events will be raised.

Parameters
[in]x0X coordinate of the rubber band's starting point.
[in]y0Y coordinate of the rubber band's starting point.
[in]x1X coordinate of the rubber band's end point.
[in]y1Y coordinate of the rubber band's end point.
[in]distanceDistance between vertex 1 and vertex 2.
[in]angleAngle between vertex 1 and vertex 2.

◆ RubberDragged()

void RubberDragged ( long  x0,
long  y0,
long  x1,
long  y1,
double  distance,
double  angle 
)

Event that is raised when the user releases the left mouse button after having dragged a rubber band.

Note that you need to have set the display's #LeftBuffonMode property accordingly, otherwise no rubber band events will be raised.

Parameters
[in]x0X coordinate of the rubber band's starting point.
[in]y0Y coordinate of the rubber band's starting point.
[in]x1X coordinate of the rubber band's end point.
[in]y1Y coordinate of the rubber band's end point.
[in]distanceDistance between vertex 1 and vertex 2.
[in]angleAngle between vertex 1 and vertex 2.

◆ UserObjectClick()

void UserObjectClick ( long  ID)

This event is triggered when a user-defined object is selected by a mouse click.

Attention
This event is not supported in Visual Basic.
Parameters
[in]IDID of the selected object.
Examples:
Delphi - Delphi Overlay Example
Visual C++ - VC Image Overlay Example

◆ UserObjectDrag()

void UserObjectDrag ( long  ID)

This event is triggered when a user-defined object is dragged.

Attention
This event is not supported in Visual Basic.
Parameters
[in]IDID of the selected object.
Examples:
Delphi - Delphi Overlay Example
Visual C++ - VC Image Overlay Example

◆ UserObjectDraged()

void UserObjectDraged ( long  ID)

This event is triggered when a user-defined object was dragged and the left mouse button was pressed again.

Attention
This event is not supported in Visual Basic.
Parameters
[in]IDID of the selected object.
Examples:
Delphi - Delphi Overlay Example
Visual C++ - VC Image Overlay Example

◆ UserPaint()

void UserPaint ( long  ID,
long  NumVertices,
__int3264  Vertices,
boolean  Dragging,
__int3264  hDC 
)

This event is triggered when a user-defined graphic objects have to be repainted.

Attention
This event is not supported in Visual Basic.
Parameters
[in]IDID of the label to be repainted.
[in]NumVerticesNumber of vertices of the display object.
[in]VerticesA POINT-type listing containing the object vertices in windows coordinates.
[in]DraggingSpecifies whether dragging is still in progress or not.
[in]hDCHandle for the DC which must be used for drawing.
Examples:
Delphi - Delphi Overlay Example
Visual C++ - VC Image Overlay Example