当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 2020-08-15:什么情况下数据任务需要优化?
- html+ vue.js Implementing paging compatible IE
- How about small and medium-sized enterprises choose shared office?
- The method of realizing high SLO on large scale kubernetes cluster
- Novice guidance and event management system in game development
- MRAM高速缓存的组成
- 谷歌浏览器实现视频播放加速功能
- 2020 database technology conference helps technology upgrade
- 检测证书过期脚本
- EOS founder BM: what's the difference between UE, UBI and URI?
猜你喜欢
This project allows you to quickly learn about a programming language in a few minutes
An article takes you to understand CSS gradient knowledge
list转换map(根据key来拆分list,相同key的value为一个list)
Diamond standard
Those who have worked in China for six years and a million annual salary want to share these four points with you
Basic usage of Vue codemirror: search function, code folding function, get editor value and verify in time
C and C / C + + mixed programming series 5 - GC collaboration of memory management
Description of phpshe SMS plug-in
Pn8162 20W PD fast charging chip, PD fast charging charger scheme
【涂鸦物联网足迹】物联网基础介绍篇
随机推荐
2020-08-30:裸写算法:二叉树两个节点的最近公共祖先。
From overseas to China, rancher wants to do research on container cloud market
C and C / C + + mixed programming series 5 - GC collaboration of memory management
Event monitoring problem
ES6 learning notes (2): teach you to play with class inheritance and class objects
【涂鸦物联网足迹】物联网基础介绍篇
Open source a set of minimalist front and rear end separation project scaffold
Elasticsearch database | elasticsearch-7.5.0 application construction
2020 database technology conference helps technology upgrade
ES中删除索引的mapping字段时应该考虑的点
All the way, I was forced to talk about C code debugging skills and remote debugging
Diamond standard
An article takes you to understand CSS pagination examples
Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think
The role of theme music in games
Hdu3974 assign the task segment tree DFS order
Multi robot market share solution
【涂鸦物联网足迹】涂鸦云平台全景介绍
Flink's datasource Trilogy: direct API
MongoDB与SQL常用语法对应表