Link to home
Start Free TrialLog in
Avatar of charlesj
charlesj

asked on

displaying a device independent bitmap

I need to display a device independent bitmap. I have a function that reads a gif or jpg and returns a valid handle to a dib - but how do I then display it in a form? I can't find a vb call or component that takes an hDIB. I don't want to use BitBlt if I don't have to. And besides, all I have is a handle to the dib, not a device context. BitBlt requires a source device context. I guess I could use the API call and create one then stick the hDib into the device context but that's heading me back to BitBlt which I'd rather avoid.
Avatar of idcanada
idcanada


Does the picture control solve your problem?

Maybe if you could post more information...

Avatar of charlesj

ASKER

Nope, the picture control does not solve the problem. I looked at it and the image control first of all. You can retrieve the image property (picture property) from them but I need to set it. And the only way you can set the graphic for those controls is to provide a path to a file. I have a gif file which I have converted into a handle to a dib, now I need to display that dib.
ASKER CERTIFIED SOLUTION
Avatar of VBDesigns
VBDesigns

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks VBDesigns. That was the trick.