LAnnPoint::GetBitmap

#include "ltwrappr.h"

virtual L_INT LAnnPoint::GetBitmap(pBitmap, uStructSize)

virtual L_INT LAnnPoint::GetBitmap(pBitmap, uStructSize)

LBitmapBase * pBitmap;

/* pointer to an LBitmapBase object */

pBITMAPHANDLE pBitmap;

/* address of the variable to be updated */

L_UINT uStructSize;

/* size in bytes, of the structure pointed to by pBitmap */

Gets the bitmap handle of the annotation object.

Parameter

Description

pBitmap

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

pBitmap

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

uStructSize

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

Returns

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

LTANN

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

Platforms

Win32, x64.

See Also

Functions:

LAnnPoint::SetBitmap, Class Members

Topics:

Annotation Functions: Object Properties

 

Using Annotation Bitmap Objects

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;
}