Note: When a memory device context is created, it initially has a 1-by-1 monochrome bitmap selected into it. If this memory device context is used in CreateCompatibleBitmap, the bitmap that is created is a monochrome bitmap. To create a color bitmap, use the HDC that was used to create the memory device context.
So to get antialiasing working one would just need to pass the device context of the screen (via GetDC(0)) as the first argument to CreateCompatibleBitmap.