LAnnPoint::GetBitmap

Summary

Gets the bitmap handle of the annotation object.

Syntax

#include "ltwrappr.h"

virtual L_INT LAnnPoint::GetBitmap(pBitmap, uStructSize)

virtual L_INT LAnnPoint::GetBitmap(pBitmap, uStructSize)

Parameters

LBitmapBase * pBitmap

Pointer to an LBitmapBase object to be updated with the handle to the annotation object's bitmap.

pBITMAPHANDLE pBitmap

Address of the variable to be updated with the handle to the annotation object's bitmap.

L_UINT uStructSize

Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Before calling LAnnPoint::GetBitmap(pBitmap, uStructSize), where pBitmap is of type LBitmapBase , you must declare an LBitmapBase object. Then, pass the address of the object in the pBitmap parameter. This function will update the object with the handle to the annotation object's bitmap.

Before calling LAnnPoint::GetBitmap(pBitmap, uStructSize), where pBitmap is of type pBITMAPHANDLE, you must declare a variable of data type BITMAPHANDLE. Then, pass the address of the variable in the pBitmap parameter. This function will update the variable with the handle to the annotation object's bitmap.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This is an example of both forms of LAnnPoint::GetBitmap(pBitmap:

L_INT LAnnPoint_GetBitmapExample(HWND hWnd) 
{ 
   ANNPOINT annPoint = {50,50}; 
   ANNRECT  annRect =  {50,50,150,150}; 
 
   LAnnPoint *pMyAnnPoint = new(LAnnPoint); 
 
   pMyAnnPoint->SetPoints(&annPoint); 
   pMyAnnPoint->SetVisible(TRUE); 
 
   //Invert the primary bitmap 
   LBitmapBase *pBitmapBase = new(LBitmapBase); 
   pMyAnnPoint->GetBitmap(pBitmapBase, sizeof(BITMAPHANDLE)); 
   //or 
   //BITMAPHANDLE LeadBitmap; 
   //pMyAnnPoint->GetBitmap(&LeadBitmap, sizeof(BITMAPHANDLE)); 
 
   //Make the annotation point all white 
   pBitmapBase->Fill(RGB(255,255,255)); 
 
   //Create container and insert annotation 
   LAnnContainer m_AnnContainer; 
   m_AnnContainer.Create(hWnd, &annRect, TRUE); 
   m_AnnContainer.Insert(*pMyAnnPoint); 
   m_AnnContainer.SetUserMode(ANNUSER_RUN); 
 
   return SUCCESS; 
} 

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.