当前位置:网站首页>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 ");
}
}
边栏推荐
- My openwrt learning notes (V): choice of openwrt development hardware platform - mt7688
- Serial communication based on 51 single chip microcomputer
- 【力扣刷题笔记(二)】特别技巧,模块突破,45道经典题目分类总结,在不断巩固中精进
- openEuler kernel 技術分享 - 第1期 - kdump 基本原理、使用及案例介紹
- 新系列单片机还延续了STM32产品家族的低电压和节能两大优势
- 手机都算是单片机的一种,只不过它用的硬件不是51的芯片
- 没有多少人能够最终把自己的兴趣带到大学毕业上
- Yocto technology sharing phase IV: customize and add software package support
- Fundamentals of Electronic Technology (III)__ Chapter 1 resistance of parallel circuit
- Synchronization control between tasks
猜你喜欢

单片机学到什么程度能找到工作,这个标准不好量化

2.Elment Ui 日期选择器 格式化问题

单片机现在可谓是铺天盖地,种类繁多,让开发者们应接不暇

Development of intelligent charging pile (I): overview of the overall design of the system

Fundamentals of Electronic Technology (III)__ Chapter 1 resistance of parallel circuit

Oracle数据库 SQL语句执行计划、语句跟踪与优化实例

LeetCode - 919. 完全二叉树插入器 (数组)

没有多少人能够最终把自己的兴趣带到大学毕业上

LeetCode - 508. 出现次数最多的子树元素和 (二叉树的遍历)

2021-10-28
随机推荐
STM32 interrupt switch
Google browser plug-in recommendation
Emballage automatique et déballage compris? Quel est le principe?
[combinatorics] Introduction to Combinatorics (combinatorial idea 3: upper and lower bound approximation | upper and lower bound approximation example Remsey number)
2312、卖木头块 | 面试官与狂徒张三的那些事(leetcode,附思维导图 + 全部解法)
干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己
When you need to use some functions of STM32, but 51 can't realize them, 32 naturally doesn't need to learn
byte alignment
Gif image analysis drawing RGB to YUV table lookup method to reduce CPU occupancy
自动装箱与拆箱了解吗?原理是什么?
Introduction to chromium embedded framework (CEF)
[untitled] proteus simulation of traffic lights based on 89C51 Single Chip Microcomputer
Basic knowledge of communication interface
Fundamentals of Electronic Technology (III)__ Chapter 1 resistance of parallel circuit
Not many people can finally bring their interests to college graduation
Application of external interrupts
My 4G smart charging pile gateway design and development related articles
Runtime. getRuntime(). GC () and runtime getRuntime(). The difference between runfinalization()
Of course, the most widely used 8-bit single chip microcomputer is also the single chip microcomputer that beginners are most easy to learn
Yocto Technology Sharing Phase 4: Custom add package support