当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- An article taught you to use HTML5 SVG tags
- [self taught unity2d legendary game development] map editor
- list转换map(根据key来拆分list,相同key的value为一个list)
- Stickinengine architecture 12 communication protocol
- jenkins安装部署过程简记
- Unity performance optimization
- Understanding formatting principles
- C# 调用SendMessage刷新任务栏图标(强制结束时图标未消失)
- Python basic variable type -- list analysis
- The method of realizing high SLO on large scale kubernetes cluster
猜你喜欢
ado.net和asp.net的关系
To teach you to easily understand the basic usage of Vue codemirror: mainly to achieve code editing, verification prompt, code formatting
Filecoin has completed a major upgrade and achieved four major project progress!
What is the meaning of sector sealing of filecoin mining machine since the main network of filecoin was put online
实用工具类函数(持续更新)
大数据处理黑科技:揭秘PB级数仓GaussDB(DWS) 并行计算技术
递归、回溯算法常用数学基础公式
[byte jumps, autumn recruitment Posts open] ohayoo! Don't leave after school, I want to ask you to play games!!!
CloudQuery V1.2.0 版本发布
Look! Internet, e-commerce offline big data analysis best practice! (Internet disk link attached)
随机推荐
Using iceberg on kubernetes to create a new generation of cloud original data Lake
The role of theme music in games
Using an example to understand the underlying processing mechanism of JS function
What is the purchasing supplier system? Solution of purchasing supplier management platform
面试官: ShardingSphere 学一下吧
window系统 本机查找端口号占用方法
What is the tensor in tensorflow?
ES6 learning notes (2): teach you to play with class inheritance and class objects
Flink's datasource Trilogy 2: built in connector
How to make characters move
2020-08-14:数据任务的执行引擎用的哪些?
What the hell is fastthreadlocal? The existence of ThreadLocal!!
检测证书过期脚本
Markdown tricks
How much disk space does a file of 1 byte actually occupy
Unity performance optimization
git远程库回退指定版本
An article taught you to download cool dog music using Python web crawler
Digital city responds to relevant national policies and vigorously develops the construction of digital twin platform
Road to simple HTML + JS to achieve the most simple game Tetris