RefBitmapList example for C++ 5.0 and later
// tell m_Lead1 to "steal" the bitmap list from m_Lead2
m_LEADRasterView1.GetRaster().SetRefBitmapList(TRUE);
// move the bitmap list from m_Lead2 to m_Lead1
m_LEADRasterView1.GetRaster().SetBitmapList(m_LEADRasterView2.GetRaster().GetBitmapList());
// restore the default value for RefBitmapList
m_LEADRasterView1.GetRaster().SetRefBitmapList(FALSE);
// for safety, let m_Lead2 know that its list has been emptied
m_LEADRasterView2.GetRaster().SetBitmapList(NULL);