AutoPatientInfoRecorder/src/AntdUI/Lib/Vanara/User32/WinUser.Cursor.cs
(开头部分) 34KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// THIS FILE IS PART OF Vanara PROJECT
// THE Vanara PROJECT IS AN OPENSOURCE LIBRARY LICENSED UNDER THE MIT License.
// COPYRIGHT (C) dahall. ALL RIGHTS RESERVED.
// GITHUB: https://github.com/dahall/Vanara
using System;
using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class User32
{
/// <summary>
/// <para>
/// Confines the cursor to a rectangular area on the screen. If a subsequent cursor position (set by the SetCursorPos function or the
/// mouse) lies outside the rectangle, the system automatically adjusts the position to keep the cursor inside the rectangular area.
/// </para>
/// </summary>
/// <param name="lpRect">
/// <para>Type: <c>const RECT*</c></para>
/// <para>
/// A pointer to the structure that contains the screen coordinates of the upper-left and lower-right corners of the confining
/// rectangle. If this parameter is <c>NULL</c>, the cursor is free to move anywhere on the screen.
/// </para>
/// </param>
/// <returns>
/// <para>Type: <c>BOOL</c></para>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>
/// </returns>
/// <remarks>
/// <para>
/// The cursor is a shared resource. If an application confines the cursor, it must release the cursor by using <c>ClipCursor</c>
/// before relinquishing control to another application.
/// </para>
/// <para>The calling process must have <c>WINSTA_WRITEATTRIBUTES</c> access to the window station.</para>
/// <para>Examples</para>
/// <para>For an example, see Confining a Cursor.</para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-clipcursor BOOL ClipCursor( CONST RECT *lpRect );
[DllImport("user32.dll", SetLastError = true, ExactSpelling = true)]
[PInvokeData("winuser.h", MSDNShortId = "clipcursor")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool ClipCursor(in RECT lpRect);
/// <summary>
/// <para>Creates a cursor having the specified size, bit patterns, and hot spot.</para>
/// </summary>
/// <param name="hInst">
/// <para>Type: <c>HINSTANCE</c></para>
/// <para>A handle to the current instance of the application creating the cursor.</para>
/// </param>
/// <param name="xHotSpot">
/// <para>Type: <c>int</c></para>
/// <para>The horizontal position of the cursor's hot spot.</para>
/// </param>
/// <param name="yHotSpot">
/// <para>Type: <c>int</c></para>
/// <para>The vertical position of the cursor's hot spot.</para>
/// </param>
后面还有 591 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。