Creating a Bitmap by Duplicating

This topic provides an example that shows the creation of a bitmap by the duplication of another bitmap.

// create bitmap 3 as a duplicate of bitmap 2
iBitmap3 = new (ELeave) CFbsBitmap();
User::LeaveIfError(iBitmap3->Duplicate(iBitmap2->Handle()));

Note: The deletion of bitmap 2 would not affect bitmap 3 in any way.