在vc环境下什么函数可以移动光标到指定位置?

javaadu
博客专家认证
2009-06-15 05:46:31
在vc环境下什么函数可以移动光标到指定位置?
...全文
270 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
jenglev 2009-06-15
  • 打赏
  • 举报
回复
#include<winuser.h>
javaadu 2009-06-15
  • 打赏
  • 举报
回复
不行啊,为什么老报错了,那头文件应该用什么了
javaadu 2009-06-15
  • 打赏
  • 举报
回复
非常感谢!!!!!
gykgod 2009-06-15
  • 打赏
  • 举报
回复
大牛都素过样的 。


SetCursorPos
函数功能:该函数把光标移到屏幕的指定位置。如果新位置不在由 ClipCursor函数设置的屏幕矩形区域之内,则系统自动调整坐标,使得光标在矩形之内。
函数原型:BOOL SetCursorPos(int X,int Y);

SetCursorPos-函数 参数

X:指定光标的新的X坐标,以屏幕坐标表示。

Y:指定光标的新的Y坐标,以屏幕坐标表示。

返回值:如果成功,返回非零值;如果失败,返回值是零,若想获得更多错误信息,请调用GetLastError函数。

备注:该光标是共享资源,仅当该光标在一个窗口的客户区域内时它才能移动该光标。

速查:Windows NT:3.1及以上版本;Windows:95及以上版本;Windows CE:不支持;头文件:winuser.h;库文件:user32.lib。
javaadu 2009-06-15
  • 打赏
  • 举报
回复
Can you speak Chinese?!!!
HelloDan 2009-06-15
  • 打赏
  • 举报
回复
Moves the cursor to the specified screen coordinates. If the new coordinates are not within the screen rectangle set by the most recent ClipCursor function call, the system automatically adjusts the coordinates so that the cursor stays within the rectangle.

Syntax

BOOL SetCursorPos( int X,
int Y
);
Parameters

X
[in] Specifies the new x-coordinate of the cursor, in screen coordinates.
Y
[in] Specifies the new y-coordinate of the cursor, in screen coordinates.
Return Value

Returns nonzero if successful or zero otherwise. To get extended error information, call GetLastError.

69,380

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧