Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create CBitmap from buffer

Status
Not open for further replies.

dima2

Programmer
Jan 20, 2002
85
0
0
LB
is there a way to create a CBitmap object form a buffer containing
data in bmp format?
 
The only thing you need are the actual bitmap bits and the color information for that bitmap.

use CBitmap's CreateBitmap function for that and extract the bitmap dimensions and colors from that buffer.

But, I don't thing there is any way to pass the whole buffer to the bitmap and expect that the class will initialize itself.

If you want to load a bitmap from a file, you may use LoadImage function which returns a HBITMAP and then use that to further initialize your class.
[red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top