当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- All the way, I was forced to talk about C code debugging skills and remote debugging
- What is the tensor in tensorflow?
- Multi robot market share solution
- 意派Epub360丨你想要的H5模板都在这里,电子书、大转盘、红包雨、问卷调查……
- ado.net和asp.net的关系
- In depth to uncover the bottom layer of garbage collection, this time let you understand her thoroughly
- 2020年第四届中国 BIM (数字建造)经理高峰论坛即将在杭举办
- MRAM高速缓存的组成
- 面试官: ShardingSphere 学一下吧
- IPFs rudder filecoin landing at the same time, fil currency price broke a thousand
猜你喜欢
STM32F030F4P6兼容灵动微MM32F031F4P6
Basic usage of Vue codemirror: search function, code folding function, get editor value and verify in time
Git rebase is in trouble. What to do? Waiting line
Zero basis to build a web search engine of its own
迅为-iMX6ULL开发板上配置AP热点
上海巨微专用蓝牙广播芯片
Junit测试出现 empty test suite
美团内部讲座|周烜:华东师范大学的数据库系统研究
A small goal in 2019 to become a blog expert of CSDN
The method of realizing high SLO on large scale kubernetes cluster
随机推荐
mongo 用户权限 登录指令
Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think
MongoDB与SQL常用语法对应表
Using an example to understand the underlying processing mechanism of JS function
2020年第四届中国 BIM (数字建造)经理高峰论坛即将在杭举办
2020-09-09:裸写算法:两个线程轮流打印数字1-100。
Application insights application insights use application maps to build request link views
【涂鸦物联网足迹】涂鸦云平台全景介绍
解决 WPF 绑定集合后数据变动界面却不更新的问题
Visual rolling [contrast beauty]
What is alicloud's experience of sweeping goods for 100 yuan?
What grammar is it? ]
Building a new generation cloud native data lake with iceberg on kubernetes
ado.net和asp.net的关系
All the way, I was forced to talk about C code debugging skills and remote debugging
File download manager realized by electron
Understanding formatting principles
Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
What are the highlights of Huawei mate 40 series with HMS?
Outsourcing is really difficult. As an outsourcer, I can't help sighing.