Environment:
VC++ 6, NT4
Introduction
The CArrayBITMAP class
stores a Windows bitmap
and provides member functions to manipulate the bitmap's
array.
Bitmaps are stored
in an array with elements such as a BITMAP
structure. This class is recommended for temporary image
storage. Bitmaps may
be any standard type and size. The quantity of kept images
is limited to the system's memory size and maximal size of
type integer.
This class has the
following public functions for its use:
int Add(CBitmap * pCBitmap);
int
Add(LPBITMAP pBITMAP);
int GetSize();
BOOL Replace(int iIndex, LPBITMAP pBITMAP);
BOOL Remove(int iIndex);
void RemoveAll();
LPBITMAP GetAt(int iIndex);
Example
of This Class's Use
CArrayBITMAP arrayBitmaps;
CBitmap m_bitmap;
m_bitmap.LoadBitmap(OBM_MYBIT);
int
iIndex = arrayBitmaps.Add(&bit);
...
CBitmap bitStored;
LPBITMAP pBmp = arrayBitmaps.GetAt(iIndex);
if(pBmp != NULL)
bitStored.CreateBitmapIndirect(pBmp);
...
Downloads