当前位置:网站首页>C calls SendMessage to refresh the taskbar icon (the icon does not disappear at the end of forcing)
C calls SendMessage to refresh the taskbar icon (the icon does not disappear at the end of forcing)
2020-11-06 21:24:00 【Irving the procedural ape】
In this paper, the reference C++ rewrite https://blog.csdn.net/dpsying/article/details/20139651 ( There are misunderstandings about the coordinates of this article , It will lead to invalid function )
SendMessage Move the coordinates in the mouse It's based on the inside of the handle coordinate , It's not screen coordinates , Taskbar width 300 Fixed height 40, So it should be from the width 0-300 coordinate 15 Between Move past .
First state what you need to use winapi function
1 [DllImport("user32.dll", EntryPoint = "FindWindow")] 2 private static extern int FindWindow(string lpszClass, string lpszWindow); 3 [DllImport("user32.dll", EntryPoint = "FindWindowEx")] 4 private static extern int FindWindowEx(int hwndParent, int hwndChildAfter, string lpszClass, string lpszWindow); 5 6 [DllImport("user32.dll", EntryPoint = "GetWindowRect")] 7 private static extern int GetWindowRect(int hwnd, ref System.Drawing.Rectangle lpRect); 8 [DllImport("user32.dll", EntryPoint = "SendMessage")] 9 private static extern int SendMessage(int hwnd, int wMsg, int wParam, int lParam);10 11 private static readonly int WM_MOUSEMOVE = 512;winapi
Encapsulate the called process method
版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢
边栏推荐
- A concise tutorial for Nacos, ribbon and feign
- Contract trading system development | construction of smart contract trading platform
- Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think
- 递归、回溯算法常用数学基础公式
- Stickinengine architecture 11 message queue
- 【学习】接口测试用例编写和测试关注点
- window系统 本机查找端口号占用方法
- es创建新的索引库并拷贝旧的索引库 实践亲测有效!
- C# 调用SendMessage刷新任务栏图标(强制结束时图标未消失)
- 嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王涛
猜你喜欢

An article takes you to understand CSS pagination examples

git远程库回退指定版本

2020-08-20:GO语言中的协程与Python中的协程的区别?

GitHub: the foundation of the front end

Understanding formatting principles

An article takes you to understand CSS3 picture border

ERD-ONLINE 免费在线数据库建模工具

Filecoin has completed a major upgrade and achieved four major project progress!

Axios learning notes (2): easy to understand the use of XHR and how to package simple Axios

行为型模式之解释器模式
随机推荐
谷歌浏览器实现视频播放加速功能
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
Event monitoring problem
Summary of front-end interview questions (C, s, s) that front-end engineers need to understand (2)
MRAM高速缓存的组成
To teach you to easily understand the basic usage of Vue codemirror: mainly to achieve code editing, verification prompt, code formatting
An article taught you to use HTML5 SVG tags
Stickinengine architecture 12 communication protocol
Application insights application insights use application maps to build request link views
Python basic data type -- tuple analysis
检测证书过期脚本
Stickinengine architecture 11 message queue
Using iceberg on kubernetes to create a new generation of cloud original data Lake
Elasticsearch database | elasticsearch-7.5.0 application construction
html+ vue.js Implementing paging compatible IE
Call analysis of start method in JNI thread and callback analysis of run method
Why is quicksort so fast?
EOS founder BM: what's the difference between UE, UBI and URI?
What is the purchasing supplier system? Solution of purchasing supplier management platform
Use modelarts quickly, zero base white can also play AI!