LVectorBase::SetMarker

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetMarker(pMarker)

const pVECTORMARKER pMarker;

pointer to a structure

Sets the new marker settings.

Parameter

Description

pMarker

Pointer to a VECTORMARKER structure that contains the marker settings to set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The marker is used to indicate those objects within the vector handle that are selected.

For more information on available marker settings, refer to the VECTORMARKER structure.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::GetMarker.

Topics:

Working with Vector Handles

Example

This example will toggle the use of pen and brush color red and blue for markers.

L_INT LVectorBase__SetMarkerExample(HWND hWnd, LVectorBase *pVector) 
{ 
   UNREFERENCED_PARAMETER(hWnd); 
   L_INT          nRet; 
   VECTORMARKER   Marker; 
   // Get marker settings 
   nRet = pVector->GetMarker(&Marker ); 
   if(nRet != SUCCESS) 
      return nRet; 
   // Toggle pen and brush color between red and blue 
   if( Marker.Pen.NewPen.LogPen.lopnColor == RGB( 0xFF, 0x00, 0x00 ) ) 
   { 
      Marker.Pen.NewPen.LogPen.lopnColor = RGB( 0x00, 0x00, 0xFF ); 
      Marker.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( 0x00, 0x00, 0xFF ); 
   } 
   else 
   { 
      Marker.Pen.NewPen.LogPen.lopnColor = RGB( 0xFF, 0x00, 0x00 ); 
      Marker.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( 0xFF, 0x00, 0x00 ); 
   } 
   Marker.dwFlags = Marker.dwFlags | VECTOR_MARKER_PEN_COLOR | VECTOR_MARKER_BRUSH_COLOR; 
   // Set new marker 
   nRet = pVector->SetMarker (&Marker ); 
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Vector C++ Class Library Help