25-02-2013, 08:29 AM
تعديل بسيط لدعم التقاط مؤشر الفأرة
PHP كود :
var
DC : HDC;
Re : TRect;
WidthWin, HeightWin : Integer;
BitmapScreen : TBitmap;
rPos:TPoint;
cInfo :TCursorInfo;
begin
DC := GetDC(GetDesktopWindow);
WidthWin := GetDeviceCaps(DC, HORZRES);
HeightWin := GetDeviceCaps(DC, VERTRES);
img1.Width := WidthWin;
img1.Height := HeightWin;
cInfo.cbSize := SizeOf(cInfo);
GetCursorInfo(cInfo);
GetCursorPos(rPos);
BitBlt(img1.Canvas.Handle,0,0,img1.Width,img1.Height,
DC,0,0,SRCCOPY);
DrawIcon(img1.Canvas.Handle,rPos.X,rPos.Y,cInfo.hCursor);
ReleaseDC(GetDesktopWindow,DC);
end;

