Available in the LEADTOOLS Imaging toolkit. |
RefBitmapList property (Main Control)
Visual
Basic example
Visual
C++ 4.0 example
Syntax BOOL RefBitmapList
Overview: Refer to Bitmaps and Bitmap Lists.
Remarks
Indicates whether an assignment to the BitmapList property should do a copy or simply move the source control's BitmapList to the destination control's BitmapList. Possible values are:
Value |
Meaning |
TRUE |
Move the source control's bitmap list to the bitmap list of the destination control. |
FALSE |
Copy the source control's bitmap list into the bitmap list of the destination control. |
This property is taken into account when setting the BitmapList property of the main control. If RefBitmapList is true, then the destination control will ‘steal’ the bitmaps from the source control. The source control will eventually detect that its bitmap list is empty, but you should notify the source control that its list has been freed by setting its bitmap list to NULL. If RefBitmapList is False, then the destination control makes a copy of the source control’s bitmap list. That means that two copies of the list exist in memory. Many times, we are trying to move the list from one control to the other with code like this:
LEAD1.BitmapList = LEAD2.BitmapList
LEAD2.BitmapList = 0
In this case, it is much faster to set RefBitmapList to TRUE before assigning the bitmap list. By doing that, you don’t have two copies of the bitmap list. (Which is what you have if you do “LEAD2.BitmapList = 0”).
See Also
Elements: BitmapList property
Topics: Raster Images: Creating and Maintaining Lists of Images