How can I draw Rectangles, Lines, Circles, etc to a CBitmap object. Later I wish to save this CBitmap object to a .BMP File. How can I achieve this.

Also please provide some small code sample for drawing to the CBitmap object.