Reputation: 762
I need code in C++ that gets HBITMAP from one side and sends it through the socket and on the other side receive and make it HBITMAP again.
It has to be fast and effective
If it is more comfortable, use the GDI+ bitmap
Upvotes: 2
Views: 679
Reputation: 62472
That's so not going to work!
What you need to go is convert the HBITMAP
to a BITMAP
using the GetObject function. Then serialize this object over the network. NOTE: You'll need to make sure you serialize the bmBits
member correctly.
On the other side, once you've deserialized the BITMAP
you can use CreateBitmapIndirect to get a HBITMAP
.
Upvotes: 1