Lupe Gestrecktes Fenster GUI Fenster anpassen

    • Offizieller Beitrag

    Diese Version stammt glaub ich von Xeno:

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $MagWidth = InputBox ("Magnify Area", "What should the WIDTH of the magnified area be?")
    $MagHeight = InputBox ("Magnify Area", "What should the HEIGHT of the magnified area be?")
    $MagZoom = InputBox ("Magnify Area", "What should the ZOOM of the magnified area be?", 2)

    [/autoit] [autoit][/autoit] [autoit]

    ;~ Global $SRCCOPY = 0x00CC0020
    Global $dll[3], $DeskHDC, $GUIHDC

    [/autoit] [autoit][/autoit] [autoit]

    ;~ HotKeySet("!+e", "_ende")

    [/autoit] [autoit][/autoit] [autoit]

    $dll[1] = DllOpen ( "user32.dll")
    $dll[2] = DllOpen ( "gdi32.dll")

    [/autoit] [autoit][/autoit] [autoit]

    Global $GUI = GUICreate ("Zoom x2 Au3", $MagWidth * $MagZoom, $MagHeight * $MagZoom, _
    MouseGetPos (0), MouseGetPos (1), $WS_POPUP+$WS_BORDER, $WS_EX_TOPMOST)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    Global $LastPos[2] = [0,0]

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    MAG()
    $MousePos = MouseGetPos()
    If ($LastPos[0] <> $MousePos[0] Or $LastPos[1] <> $MousePos[1]) Then
    WinMove("Zoom x2 Au3", "", $MousePos[0] + $MagWidth/2 + 5, $MousePos[1])
    $LastPos[0] = $MousePos[0]
    $LastPos[1] = $MousePos[1]
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Sleep(10)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func MAG()
    $DeskHDC = DLLCall("user32.dll","int","GetDC","hwnd",0)
    $GUIHDC = DLLCall("user32.dll","int","GetDC","hwnd",$GUI)
    If Not @error Then
    DLLCall("gdi32.dll", "int", "StretchBlt", "int", $GUIHDC[0], "int", _
    0, "int", 0, "int", $MagWidth * $MagZoom, "int", $MagHeight * $MagZoom, "int", $DeskHDC[0], "int", _
    MouseGetPos (0) - $MagWidth/2, "int", MouseGetPos (1) - $MagHeight/2, "int", $MagWidth ,"int", $MagHeight, _
    "long", $SRCCOPY)
    DLLCall("user32.dll","int","ReleaseDC","int",$DeskHDC[0],"hwnd",0)
    DLLCall("user32.dll","int","ReleaseDC","int",$GUIHDC[0],"hwnd",$GUI)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func OnAutoItExit()
    DllClose ( $dll[1] )
    DllClose ( $dll[2] )
    EndFunc

    [/autoit]