A strange Problem about gdi+ bitmap!

bitmapgdi+

I am using the following code to get a Bitmap point,

(width = 800, height = 600);

Bitmap* m_BitmapCanvasCore = new Bitmap(width, height, PixelFormat32bppARGB);

but the m_BitmapCanvasCore always is NULL…
Is there any thing wrong about gdi+? Or any namespace polution I need to avoid?
Why?

Best Answer

Did you call GdiplusStartup before creating the Bitmap?