Funktionreferenz


_WinAPI_ClipCursor


Confines the cursor to a rectangular area on the screen

#include <WinAPIRes.au3>
_WinAPI_ClipCursor ( $tRECT )

Parameter

$tRECT $tagRECT structure that contains the screen coordinates of the confining rectangle.
If this parameter is 0, the cursor is free to move anywhere on the screen.

Rückgabewert

Success: True.
Failure: False, call _WinAPI_GetLastError() to get extended error information.

Bemerkungen

The cursor is a shared resource.
If an application confines the cursor, it must release the cursor by using _WinAPI_ClipCursor() before relinquishing control to another application.

Siehe auch

Suche nach ClipCursor in der MSDN Bibliothek.

Beispiel

#include <WinAPIMisc.au3>
#include <WinAPIRes.au3>

_Example()

Func _Example()
    _WinAPI_ClipCursor(_WinAPI_CreateRectEx(0, 0, 400, 400))
    Sleep(5000)
    _WinAPI_ClipCursor(0)
EndFunc   ;==>_Example