Adding bitmaps

How do I add bitmaps to a Visual Studios 2005 C++ program without using The Windows Forms interface or express edition. After adding a bitmap as a resource is there a way to insert the bitmap.

Answer this question

Adding bitmaps

  • fivefinger

    Use Bitmap::FromResource() to load the bitmap from a .NET resource, then use Bitmap.GetHbitmap() to create a bitmap you can use with GDI (BitBlt etc). Cast the IntPtr returned by Bitmap.GetHbitmap() to a HBITMAP handle.


  • Adding bitmaps