[C++] Win32 GDI+ Loading a PNG Resource

Using GDI+, I'm trying to create a brush with a PNG as the image that is loaded from the resources. If I label the PNG file in the resource file as a BITMAP, it returns an error, and if I label it as PNG, then nothing is loaded into the Bitmap object in the main code. (Note: If I load the file by it's filename, rather than by resource, it works.)

Would anybody know how to do this, or at least be able to point me the way I need to go?

1
2
3
4
5
//Bitmap image(hinst, L"IDB_TEMP"); //This one doesn't work eitehr
Bitmap image(hinst, MAKEINTRESOURCE(IDB_TEMP));
Graphics graphics(hdc);
TextureBrush brush(&image,WrapModeTile);
graphics.FillRectangle(&brush, Rect(0, 0, 60, 88));
Topic archived. No new replies allowed.