| |
|
|
Julian Schmidt |
DEF CreateCompatibleBitmap(3) !"GDI32","CreateCompatibleBitmap"
Proc CaptureWindow
Parámetros handle&
Externo("USER32","SetForegroundWindow",handle&)
Sleep 200
Externo("USER32","keybd_event",$2C,0,0,0)
Case handle&<>0 : Externo("USER32","keybd_event",$2C,1,0,0)
MCLS %maxX,%maxY
StartPaint -1
ClipLoadBmp 0,0;0
ClearClip
EndPaint
Var hpic&=Crear("hNewPic", %BmpX, %BmpY, 0)
StartPaint hpic&
MCopyBmp 0,0-%maxX,%maxY > 0,0;0
EndPaint
Volver hpic&
ENDPROC
Proc CaptureArea
Parámetros xpos%,ypos%,maxX!,maxY!
Var hdc& = Externo("USER32","GetDC",0)
Var hmdc& = Externo("GDI32","CreateCompatibleDC",hdc&)
Var hbitmap& = CreateCompatibleBitmap(hdc&,maxX!,maxY!)
Externo("GDI32","SelectObject",hmdc&, hbitmap&)
Externo("GDI32","BitBlt",hmdc&, 0, 0, maxX!, maxY!, hdc&, xpos%, ypos%, $0CC0020)
hbitmap& = Externo("GDI32","GetCurrentObject",hmdc&, 7)
Externo("GDI32","DeleteDC",hmdc&)
Externo("USER32","ReleaseDC","USER32","ReleaseDC")
Volver hbitmap&
ENDPROC
Cls
DrawSizedPic CaptureWindow(0), 0, 0 - width(%hwnd), height(%hwnd); 0'Ganzer Bildschirn
Waitinput
DrawSizedPic CaptureWindow(%hwnd), 0, 0 - width(%hwnd), height(%hwnd); 0'Ventana
Waitinput
DrawSizedPic CaptureArea(0,0,width(%hwnd),height(%hwnd)), 0, 0 - width(%hwnd), height(%hwnd); 0'Region
Waitinput
|
|
|
| |
|
|