How do I create a Bitmap in code?. I would like to dynamically create a bitmap to pass to CBrush::CreatePatternBrush .