How to use GDI+ function Bitmap( Class type, String resource )
-
Recently I begin to program with GDI+,and I want to contruct a Bitmap object with the function Bitmap( Class type, String resource ),because my bitmap is in resource(is it right to use the function?).But I don't know how to set the parameters "type" and "resource"~ Help~:confused:
-
Recently I begin to program with GDI+,and I want to contruct a Bitmap object with the function Bitmap( Class type, String resource ),because my bitmap is in resource(is it right to use the function?).But I don't know how to set the parameters "type" and "resource"~ Help~:confused:
Construct CBitmap object to first load the bitmap from resource. Then use that object to get the handle of bitmap. Finally ,from that handle you can construct a GDI+ Bitmap object by using Bitmap::FromHandle() function.
-
Recently I begin to program with GDI+,and I want to contruct a Bitmap object with the function Bitmap( Class type, String resource ),because my bitmap is in resource(is it right to use the function?).But I don't know how to set the parameters "type" and "resource"~ Help~:confused:
Or you can use this constructor: Bitmap(HINSTANCE, const WCHAR *) e.g. Gdiplus::Bitmap bitmap(hInst, MAKEINTRESOURCEW(IDB_BITMAP)); Mark -- modified at 0:02 Friday 22nd June, 2007 Fixed Typo
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder