使用C ++的鼠标动作 [英] mouse actions using c++

查看:198
本文介绍了使用C ++的鼠标动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一种在Java中执行鼠标操作的方法.

有人可以告诉我如何使用c ++将鼠标移动到屏幕上的特定点.我在java中找到了awt包的名为 "Robot" 的类,该类可以我的目的..但问题是我的项目在c ++中,所以我需要一种在c ++中完成相同工作的方法.

有人可以告诉我一些允许我移动并单击鼠标的类,函数等.

P.S.我不是要检测鼠标事件...

I am trying to find a way to do mouse actions in java.

Can someone pls tell me how to move the mouse to a particular point on the screen using c++.I found a class named "Robot" of the awt package in java that serves my purpose..but the problem is that my project is in c++ and so i need a way to do the same job in c++.

Can someone tell me some classes, functions, etc. that would allow me to move and click the mouse.

P.S. I am not looking for detecting mouse events...

推荐答案

这是什么?您正在尝试在Java应用程序中使用C ++代码移动光标?

为什么?

我唯一能想到的想法是触发Java应用程序,然后让该指针移动光标: [
What is this? you are trying to move the cursor using C++ code in Java application?

WHY?

Only Idea I can come up with is to trigger the Java Application and let that one do the cursor move: Google on "Java moving cursor"[^]


您好,您可以使用SetCursorPos函数定位鼠标.
和mouse_event函数可用于鼠标事件.
Hi, You can use SetCursorPos function for positioning mouse.
and mouse_event function can be used for mouse event.


这篇关于使用C ++的鼠标动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆