L_VecGetObjectTooltip

#include "ltvkrn.h"

L_LVKRN_API L_UINT32 L_VecGetObjectTooltip(pVector, pObject, pBuffer, uSize)

Retrieves the tooltip of a vector object.

Parameters

pVECTORHANDLE pVector

Pointer to the vector handle.

const pVECTOROBJECT pObject

Pointer to the VECTOROBJECT structure that contains the vector object for which to get the tooltip.

L_TCHAR * pBuffer

Pointer to a buffer to be updated with the specified object's tooltip.

L_UINT32 uSize

Size of the buffer allocated for pBuffer.

Returns

If pBuffer is NULL, it will return the size of the buffer required for the tooltip string. If pBuffer is not NULL, it will return the number of bytes actually written to the buffer.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_LTVKRNTEX_API L_INT VecGetObjectTooltipExample( 
   pVECTORHANDLE pVector, 
   pVECTOROBJECT pObject, 
   L_BOOL bShow) 
{ 
   L_INT             nRet; 
   L_UINT32          uSize; 
   L_TCHAR*          pszTip; 
   VECTORTOOLTIPDESC TooltipDesc; 
 
   nRet  = SUCCESS; 
   uSize = L_VecGetObjectTooltip ( pVector, pObject, NULL, 0 ); 
 
   pszTip = (L_TCHAR*) malloc( sizeof( L_TCHAR ) * uSize ); 
   if( NULL == pszTip ) 
      return ERROR_NO_MEMORY; 
 
   nRet = SUCCESS; 
   L_VecGetObjectTooltip ( pVector, pObject, pszTip, uSize ); 
   if( lstrcmp( pszTip, TEXT("test")) == 0 ) 
   { 
      /* replace the tooltip */  
      nRet = L_VecSetObjectTooltip ( pVector, pObject, TEXT("Final")); 
      if( SUCCESS == nRet ) 
      { 
         if( bShow ) 
         { 
            ZeroMemory( &TooltipDesc, sizeof( TooltipDesc ) ); 
            TooltipDesc.Point.x = 10; 
            TooltipDesc.Point.y = 10; 
 
            TooltipDesc.Pen.lopnColor   = RGB( 0, 0, 0xFF ); 
            TooltipDesc.Pen.lopnWidth.x = 1; 
            TooltipDesc.Brush.lbColor   = RGB( 0xED, 0xF3, 0xBB ); 
            _tcscpy_s( TooltipDesc.Font.lfFaceName, LF_FACESIZE, TEXT("Helvetica")); 
            TooltipDesc.Font.lfHeight = 5; 
 
            nRet = L_VecShowObjectTooltip ( pVector, pObject, &TooltipDesc ); 
         } 
         else 
            nRet = L_VecHideObjectTooltip ( pVector, pObject ); 
      } 
   } 
   free( pszTip ); 
   return nRet; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.