I know the handle of a window. I also know the coordinates of the rectangular region of the window that I would like to capture. Once the region is captured, I would like to create a bitmap in memory of the captured region.
Here is where I am:
hObjectDC = CreateRectRgn(270, 188, 285, 224) 'Handle to caputred region
hCaptureDC = CreateCompatibleDC(hObjectDC)
hCaptureBitmap = CreateCompatibleBitmap(hCaptureDC, 15, 36)
This code fails because the captured region is not a window
IsWindow (hObjectDC) returns false
I then need to store the bitmap bits into an array.
Could you point me to an example where a common window like calc.exe is used.
Perhaps the example could show how to capture a region of the calculator window.
(Not a specific button or object)