网站首页  词典首页

请输入您要查询的函数:

 

术语 getcursorpos
释义 GetCursorPos
语法:
BOOL GetCursorPos( LPPOINT lpPoint
);
GetCursorPos函数
检索光标的位置,在屏幕坐标。
参数
lpPoint
[out]指向一个POINT结构,接收屏幕坐标的光标。
返回值
如果成功则返回非零或否则为0。为了获得更多错误信息,调用GetLastError。
备注
光标指定的位置总是在屏幕坐标,而不是由窗口中包含光标映射模式的影响。
调用进程必须具有WINSTA_READATTRIBUTES访问窗口站。
输入桌面必须是当前的桌面当您调用GetCursorPos。呼叫OpenInputDesktop,以确定是否当前的桌面是输入桌面。如果不是,请与OpenInputDesktop返回切换到该桌面HDESK SetThreadDesktop。
例如
有关示例,请参阅使用键盘来移动光标。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
游标概述,ClipCursor,GetCursorInfo,点,SetCursor,SetCursorPos,ShowCursor,GetMessagePos
==英文原文==GetCursorPos Function
Retrieves the cursor's position, in screen coordinates.
Syntax
BOOL GetCursorPos( LPPOINT lpPoint
);
Parameters
lpPoint
[out] Pointer to a POINT structure that receives the screen coordinates of the cursor.
Return Value
Returns nonzero if successful or zero otherwise. To get extended error information, call GetLastError .
Remarks
The cursor position is always specified in screen coordinates and is not affected by the mapping mode of the window that contains the cursor.
The calling process must have WINSTA_READATTRIBUTES access to the window station.
The input desktop must be the current desktop when you call GetCursorPos. Call OpenInputDesktop to determine whether the current desktop is the input desktop. If it is not, call SetThreadDesktop with the HDESK returned by OpenInputDesktop to switch to that desktop.
Example
For an example, see Using the Keyboard to Move the 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
See Also
Cursors Overview , ClipCursor , GetCursorInfo , POINT , SetCursor , SetCursorPos , ShowCursor , GetMessagePos
==原始网址==http://msdn.microsoft.com/en-us/library/ms648390(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:22:44