How to draw ARGB bitmap using GDI+?

前端 未结 4 1247
醉梦人生
醉梦人生 2021-01-20 01:02

I have valid HBITMAP handle of ARGB type. How to draw it using GDI+?

I\'ve tried method: graphics.DrawImage(Bitmap::FromHBITMAP(m_hBitmap, NULL), 0, 0); But it doesn

4条回答
  •  猫巷女王i
    2021-01-20 01:44

    Ah... but .Net doesn't use HBITMAP and GDI+ is a C++ library atop the basic Windows GDI, so I'm assuming you're using non-.Net C++.

    GDI+ has a Bitmap class, which has a FromHBITMAP() method.

    Once you have the GDI+ Bitmap instance, you can use it with the GDI+ library.

    Of course, if you can write your program in C# using .Net it will be a lot easier.

提交回复
热议问题