当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Event monitoring problem
- Share with Lianyun: is IPFs / filecoin worth investing in?
- The native API of the future trend of the front end: web components
- An article will take you to understand SVG gradient knowledge
- How to play sortable JS vuedraggable to realize nested drag function of forms
- Elasticsearch database | elasticsearch-7.5.0 application construction
- Analysis of serilog source code -- how to use it
- How does filecoin's economic model and future value support the price of fil currency breaking through thousands
- Using an example to understand the underlying processing mechanism of JS function
- Application of restful API based on MVC
猜你喜欢

The role of theme music in games

Will blockchain be the antidote to the global epidemic accelerating the transformation of Internet enterprises?

非易失性MRAM存储器应用于各级高速缓存

Python basic data type -- tuple analysis

Markdown tricks

Code generator plug-in and creator preform file analysis

谷歌浏览器实现视频播放加速功能

2020-08-14:数据任务的执行引擎用的哪些?

An article will take you to understand SVG gradient knowledge

Introduction to the development of small game cloud
随机推荐
事务的本质和死锁的原理
How to make characters move
Behind the record breaking Q2 revenue of Alibaba cloud, the cloud opening mode is reshaping
The role of theme music in games
Kubernetes and OAM to build a unified, standardized application management platform knowledge! (Internet disk link attached)
预留电池接口,内置充放电电路及电量计,迅为助力轻松搞定手持应用
A concise tutorial for Nacos, ribbon and feign
Helping financial technology innovation and development, atfx is at the forefront of the industry
An article takes you to understand CSS gradient knowledge
2020-08-15:什么情况下数据任务需要优化?
2020 database technology conference helps technology upgrade
How does filecoin's economic model and future value support the price of fil currency breaking through thousands
Metersphere developer's Manual
An article takes you to understand CSS pagination examples
Use modelarts quickly, zero base white can also play AI!
DC-1 target
Flink's datasource Trilogy: direct API
ES中删除索引的mapping字段时应该考虑的点
Multi robot market share solution
Elasticsearch database | elasticsearch-7.5.0 application construction