当前位置:网站首页>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 ");
}
}
边栏推荐
- Stm32-hal library learning, using cubemx to generate program framework
- Development of intelligent charging pile (I): overview of the overall design of the system
- (2)接口中新增的方法
- Project cost management__ Topic of comprehensive calculation
- 03 FastJson 解决循环引用
- 嵌入式系统没有特别明确的定义
- openEuler kernel 技术分享 - 第1期 - kdump 基本原理、使用及案例介绍
- Assignment to '*' form incompatible pointer type 'linkstack' {aka '*'} problem solving
- LeetCode - 919. 完全二叉树插入器 (数组)
- 【力扣刷题笔记(二)】特别技巧,模块突破,45道经典题目分类总结,在不断巩固中精进
猜你喜欢
When you need to use some functions of STM32, but 51 can't realize them, 32 naturally doesn't need to learn
For new students, if you have no contact with single-chip microcomputer, it is recommended to get started with 51 single-chip microcomputer
Getting started with JMX, MBean, mxbean, mbeanserver
Comment la base de données mémoire joue - t - elle l'avantage de la mémoire?
el-table X轴方向(横向)滚动条默认滑到右边
对于新入行的同学,如果你完全没有接触单片机,建议51单片机入门
内存数据库究竟是如何发挥内存优势的?
LeetCode - 919. 完全二叉树插入器 (数组)
There is no specific definition of embedded system
我想各位朋友都应该知道学习的基本规律就是:从易到难
随机推荐
Basic knowledge of communication interface
STM32 general timer output PWM control steering gear
The new series of MCU also continues the two advantages of STM32 product family: low voltage and energy saving
Mobile phones are a kind of MCU, but the hardware it uses is not 51 chip
Yocto Technology Sharing Phase 4: Custom add package support
Project cost management__ Topic of comprehensive calculation
要選擇那種語言為單片機編寫程序呢
The 4G module designed by the charging pile obtains NTP time through mqtt based on 4G network
Circular queue related design and implementation reference 1
Basic knowledge of MySQL database (an introduction to systematization)
Project scope management__ Scope management plan and scope specification
51 MCU tmod and timer configuration
getopt_ Typical use of long function
Pymssql controls SQL for Chinese queries
It is difficult to quantify the extent to which a single-chip computer can find a job
My notes on the development of intelligent charging pile (III): overview of the overall design of the system software
is_ power_ of_ 2 judge whether it is a multiple of 2
Design of charging pile mqtt transplantation based on 4G EC20 module
应用最广泛的8位单片机当然也是初学者们最容易上手学习的单片机
Quelle langue choisir pour programmer un micro - ordinateur à puce unique