当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Open source a set of minimalist front and rear end separation project scaffold
- Stickinengine architecture 12 communication protocol
- Vue communication and cross component listening state Vue communication
- EOS founder BM: what's the difference between UE, UBI and URI?
- CloudQuery V1.2.0 版本发布
- 2020-08-17:详细说下数据倾斜怎么解决?
- C language I blog assignment 03
- 大会倒计时|2020 PostgreSQL亚洲大会-中文分论坛议程安排
- C# 调用SendMessage刷新任务栏图标(强制结束时图标未消失)
- ES中删除索引的mapping字段时应该考虑的点
猜你喜欢

Markdown tricks

git远程库回退指定版本

Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think

上海巨微专用蓝牙广播芯片

递归、回溯算法常用数学基础公式

统计项目代码行数

Markdown tricks

To Lianyun analysis: why is IPFs / filecoin mining so difficult?

A small goal in 2019 to become a blog expert of CSDN

大会倒计时|2020 PostgreSQL亚洲大会-中文分论坛议程安排
随机推荐
Can you do it with only six characters?
ES6 learning notes (3): teach you to use js object-oriented thinking to realize the function of adding, deleting, modifying and checking tab column
Stickinengine architecture 12 communication protocol
An article taught you to use HTML5 SVG tags
An article taught you to download cool dog music using Python web crawler
This project allows you to quickly learn about a programming language in a few minutes
2020-08-29:进程线程的区别,除了包含关系之外的一些区别,底层详细信息?
【涂鸦物联网足迹】物联网基础介绍篇
Look! Internet, e-commerce offline big data analysis best practice! (Internet disk link attached)
统计项目代码行数
Event monitoring problem
[byte jumps, autumn recruitment Posts open] ohayoo! Don't leave after school, I want to ask you to play games!!!
ES中删除索引的mapping字段时应该考虑的点
jenkins安装部署过程简记
To teach you to easily understand the basic usage of Vue codemirror: mainly to achieve code editing, verification prompt, code formatting
Markdown tricks
CCR coin frying robot: the boss of bitcoin digital currency, what you have to know
意外的元素..所需元素..
To Lianyun analysis: why is IPFs / filecoin mining so difficult?
递归、回溯算法常用数学基础公式