Restored from previous forum. Originally posted by Franco.
Code: Select all
; (c) 2002 - Franco's template - absolutely freeware
; Thank's Pupil for the hint :)
; Desktop Loupe Function
;
Procedure CaptureScreen(Left.l, Top.l,Factor.l)
DC = GetDC_(0)
MemDC = CreateCompatibleDC_(DC)
BmpID = CreateImage(0, 200, 200)
SelectObject_( MemDC, BmpID)
StretchBlt_( MemDC, 0, 0,200*Factor,200*Factor, DC,Left, Top, 200, 200, #SRCCOPY )
DeleteDC_( MemDC)
ReleaseDC_(0,DC)
ProcedureReturn BmpID
EndProcedure
;
If OpenWindow(0,200,200,200,200,"Loupe",#PB_Window_SystemMenu) : Else : End : EndIf
;
CursorPosition.POINT
StartDrawing(WindowOutput(0))
;
Repeat
EventID = WindowEvent()
Delay(10)
GetCursorPos_(CursorPosition)
hImage = CaptureScreen( CursorPosition\x - 24,CursorPosition\y - 24,4)
DrawImage(hImage, 0, 0)
Until EventID=#PB_Event_CloseWindow
;
End
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.