Help, please, you Windows API gurus!
I'm using a video playback library that includes a callback event for each frame displayed, and I want to take that frame and display it in a second 'monitor' window which contains little more than a canvas gadget. The callback provides the frame as an hBitmap. How can I copy that image to my canvas gadget? Do I need to use something like BitBlt_?
Help with displaying an hBitmap on a canvas
Re: Help with displaying an hBitmap on a canvas
Code: Select all
StartDrawing(CanvasOutput(#canvas))
DrawImage(hBitmap, 0, 0)
StopDrawing()PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
ozzie
- Enthusiast

- Posts: 443
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: Help with displaying an hBitmap on a canvas
Many thanks - works perfectly (after adding the DrawImage Width and Height parameters to rescale the image). Didn't realize the solution would be so simple and standard-PB!
