Creating HBITMAP from memory buffer

后端 未结 3 1703
青春惊慌失措
青春惊慌失措 2020-11-30 15:21

I have an application which loads some blob data out of a database which can represent png formatted or raw binary data for various bitmaps and icons. This is being stored

3条回答
  •  再見小時候
    2020-11-30 15:32

    I'd use CreateCompatibleBitmap, and then call SetDIBits to fill it with your data. These are functions I have seen to work, and SetDIBits is quite flexible, although verbose.

    In my MFC years, CreateBitmap was avoided due to suspected performance issues.

提交回复
热议问题