Posted on 2003-03-12
Hello. I'm trying to copy BMP data (32bpp) from an array to an StdPicture object. I found many examples on the net, I see that using GDI I can easily handle this, but...
hBmp=CreateCompatibleBitmap(hDCSrc, Width, Height)
Call BitBlt(hDCMemory, 0, 0, Width, Height, hDCSrc, 0, 0, vbSrcCopy)
This code looks very fast, but what are all those handles? I mean, I create a compatible DC, right? Then I should set the array to that DC, using SetBitmapBits(). And then I call OleCreatePictureIndirect(). But in the example above this doesn't happens. It gets a DC from 0 (???), then selects something, getting another handle... An then uses BitBlt (not SetBitmapBits), and again, SelectObject. What are all those handles? I'll be glad if you could explain me those API calls, or at least what the a handle is. Thanks.