Edit - this part is Solved:
3rd argument not solved but I see there can be same problem with 1st argument HBitmap. HBitmap is 0.
The function calldoes not use Hbitmap, it uses device. So I need to select the bitmap from DC first. So I will get the handle. Correct?Code:PrintWindow(HCapture, device, PW_CLIENTONLY)
The 3rd argument... i am lost... idk how to solve it
I am translating from original AHK code which uses
Code:obm := SelectObject(hdc, hbm) ; // selected the bitmap first
PrintWindow(hwnd, hdc) ; // GdipCreateBitmapFromHBITMAP call, they passed uint ... the reason for confusion
pBitmap := Gdip_CreateBitmapFromHBITMAP(hbm)