L_CopyBitmapHandle

#include "l_bitmap.h"

L_VOID EXT_FUNCTION L_CopyBitmapHandle(pBitmapDst, pBitmapSrc, uStructSize)

pBITMAPHANDLE pBitmapDst;

/* pointer to the destination bitmap handle */

pBITMAPHANDLE pBitmapSrc;

/* pointer to the source bitmap handle */

L_UINT uStructSize;

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

Copies one bitmap handle to another. This function copies only the bitmap handle; it does not copy the actual image data.

Parameter

Description

pBitmapDst

Pointer to the bitmap handle referencing the destination bitmap.

pBitmapSrc

Pointer to the bitmap handle referencing the source bitmap to copy.

uStructSize

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

Returns

None.

Comments

The palette referenced by the hPalette field is not duplicated; the hPalette field is copied the same way as other fields in the bitmap handle.

Note that the destination bitmap does not have to be allocated for this function to work. Use L_CopyBitmapData to copy the contents of the image data from one bitmap to another.

Required DLLs and Libraries

LTKRN

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

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_CopyBitmap, L_CopyBitmapData,

 

L_CopyBitmapRect

Topics:

Raster Image Functions: Copying Images

 

Raster Image Functions: Palettes

 

Raster Image Functions: Using the Clipboard

Example

For complete sample code, refer to the FEATURE1 example.

/* This example loads a temporary bitmap and copies its handle to
the new bitmap. Notice that TmpBitmap is not freed, because the new 
bitmap handle references the original image data. */
BITMAPHANDLE LeadBitmap;   /* Bitmap handle for the final image */
BITMAPHANDLE TmpBitmap;    /* Bitmap handle for the initial image */
/* Load a bitmap at its own bits per pixel */
L_LoadBitmap
 (TEXT("image3.cmp"), &TmpBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL);
/* Copy bitmap handle to the new bitmap */
L_CopyBitmapHandle
(&LeadBitmap, &TmpBitmap, sizeof(BITMAPHANDLE));