网站首页  词典首页

请输入您要查询的函数:

 

术语 clipcursor
释义 ClipCursor
语法:
BOOL ClipCursor( const RECT *lpRect
);
ClipCursor函数
职能范围的ClipCursor屏幕上的光标移动到一个长方形区域。如果随后的光标位置(通过SetCursorPos函数或鼠标设置)以外的矩形在于,系统会自动调整位置来保持矩形区域内的光标。
参数
lpRect
[in]指向RECT结构,它包含的屏幕坐标左上角和低围矩形的右下角。如果该参数为NULL,则光标自由移动屏幕上的任何地方。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
光标是一个共享资源。如果应用程序范围的光标,它必须释放使用ClipCursor才决定放弃到另一个应用程序的控制光标。
调用进程必须具有WINSTA_WRITEATTRIBUTES访问窗口站。
例如
有关示例,见围游标。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
游标概述,GetClipCursor,GetCursorPos,RECT,SetCursorPos
==英文原文==ClipCursor Function
The ClipCursor function 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.
Syntax
BOOL ClipCursor( const RECT *lpRect
);
Parameters
lpRect
[in] Pointer to the RECT structure that contains the screen coordinates of the upper-left and lower-right corners of the confining rectangle. If this parameter is NULL, the cursor is free to move anywhere on the screen.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The cursor is a shared resource. If an application confines the cursor, it must release the cursor by using ClipCursor before relinquishing control to another application.
The calling process must have WINSTA_WRITEATTRIBUTES access to the window station.
Example
For an example, see Confining a Cursor .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Cursors Overview , GetClipCursor , GetCursorPos , RECT , SetCursorPos
==原始网址==http://msdn.microsoft.com/en-us/library/ms648383(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:24:26