L_CopyBitmap
#include "l_bitmap.h"
L_INT EXT_FUNCTION L_CopyBitmap(pBitmapDst, pBitmapSrc, uStructSize)
pBITMAPHANDLE pBitmapDst; |
/* points to the destination bitmap handle */ |
pBITMAPHANDLE pBitmapSrc; |
/* points to the source bitmap handle */ |
L_UINT uStructSize; |
/* size in bytes, of the structure pointed to by pBitmapDst */ |
Copies an entire image of a source bitmap and places it into a destination bitmap. This also copies all fields in the bitmap handle.
Parameter |
Description |
pBitmapDst |
Points to the destination bitmap handle to hold the copied image. |
pBitmapSrc |
Points to the source bitmap handle. You must have a valid image loaded into the bitmap for this function to work. |
uStructSize |
Size in bytes, of the structure pointed to by pBitmapDst, for versioning. Use sizeof(BITMAPHANDLE). |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The destination bitmap must not be allocated before this function is called. If the bitmap is already allocated, you must free it.
If a region is defined for the bitmap, the region is also copied.
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: |
|
|
|
Topics: |
|
|
|
|
Example
For complete sample code, refer to the CHILD.C module of the DEMO example.
/* This example loads TmpBitmap and copies it to LeadBitmap */
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 the temporary bitmap to the new bitmap */
L_CopyBitmap(&LeadBitmap, &TmpBitmap, sizeof(BITMAPHANDLE));
/* Clean up */
L_FreeBitmap(&TmpBitmap);