当前位置:网站首页>Simulate mouse click
Simulate mouse click
2022-07-03 10:02:00 【Master Hao】
void MainWindow::clicked()
{
// QMouseEvent *mEvnPress;
// QMouseEvent *mEvnRelease;
// mEvnPress = new QMouseEvent(QEvent::MouseButtonPress, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
// QApplication::sendEvent(QWidget::focusWidget(),mEvnPress);
// mEvnRelease = new QMouseEvent(QEvent::MouseButtonRelease, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
// QApplication::sendEvent(QWidget::focusWidget(),mEvnRelease);
HWND hq = FindWindow(L"LWnd_3668379641", L" Blue snow in love - The return of the king beta ");
if (hq != NULL)
{
int x=100,y=100; // Define bench marks
while(true)
{
Sleep(100);
::SendMessage(hq, WM_LBUTTONDOWN, 0, MAKELPARAM(200,200));
Sleep(200);
::SendMessage(hq, WM_LBUTTONUP, 0, MAKELPARAM(200,200));
}
}
else
{
qDebug() << QString::fromLocal8Bit(" No corresponding window found ");
}
}
边栏推荐
- Simple use of MySQL (addition, deletion, modification and query)
- 4G module initialization of charge point design
- (1) What is a lambda expression
- Not many people can finally bring their interests to college graduation
- 2312、卖木头块 | 面试官与狂徒张三的那些事(leetcode,附思维导图 + 全部解法)
- My 4G smart charging pile gateway design and development related articles
- For new students, if you have no contact with single-chip microcomputer, it is recommended to get started with 51 single-chip microcomputer
- 03 fastjason solves circular references
- GPIO port details, Hal library operation keys
- 对于新入行的同学,如果你完全没有接触单片机,建议51单片机入门
猜你喜欢

2312、卖木头块 | 面试官与狂徒张三的那些事(leetcode,附思维导图 + 全部解法)

03 fastjason solves circular references

Assignment to '*' form incompatible pointer type 'linkstack' {aka '*'} problem solving

I think all friends should know that the basic law of learning is: from easy to difficult

RESNET code details

Which language should I choose to program for single chip microcomputer

el-table X轴方向(横向)滚动条默认滑到右边

03 FastJson 解决循环引用

LeetCode - 673. 最长递增子序列的个数

2021-10-27
随机推荐
El table X-axis direction (horizontal) scroll bar slides to the right by default
2.Elment Ui 日期选择器 格式化问题
The new series of MCU also continues the two advantages of STM32 product family: low voltage and energy saving
JS foundation - prototype prototype chain and macro task / micro task / event mechanism
My notes on intelligent charging pile development (II): overview of system hardware circuit design
Not many people can finally bring their interests to college graduation
Project cost management__ Cost management technology__ Article 6 prediction
Serial communication based on 51 single chip microcomputer
Stm32 NVIC interrupt priority management
2020-08-23
(1) What is a lambda expression
How does the memory database give full play to the advantages of memory?
openEuler kernel 技术分享 - 第1期 - kdump 基本原理、使用及案例介绍
LeetCode - 508. 出现次数最多的子树元素和 (二叉树的遍历)
There is no shortcut to learning and development, and there is almost no situation that you can learn faster by leading the way
Oracle数据库 SQL语句执行计划、语句跟踪与优化实例
The data read by pandas is saved to the MySQL database
一个可执行的二进制文件包含的不仅仅是机器指令
Project cost management__ Cost management technology__ Article 8 performance review
Of course, the most widely used 8-bit single chip microcomputer is also the single chip microcomputer that beginners are most easy to learn