Why aren't Shell_NotifyIcon balloon tips working?

*爱你&永不变心* 提交于 2019-12-03 16:14:01

Bah, I figured it out. For some reason with the headers I have...

sizeof(NOTIFYICONDATA) == 508

whereas...

NOTIFYICONDATA_V3_SIZE == 504
NOTIFYICONDATA_V2_SIZE == 488
NOTIFYICONDATA_V1_SIZE == 88

If I specify either V2 or V3 instead of sizeof(NOTIFYICONDATA) the balloon tips show up just fine.

Have you checked in the registry under ...

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

... for EnableBalloonTips? It's something very common for users to turn off.

george b

The problem is that you are assuming Windows is going to send you a WM_LBUTTONDOWN when the user click on the icon, but that is not correct. WM_LBUTTONDOWN is sent only when the user clicks inside the hWnd's client area, if you read carefully the documentation of NOTIFYICONDATA you will realize that when the user clicks the icon Windows will send you a WM_USER+20 message (according to your code) and in the lParam paramter you will get the WM_LBUTTONDOWN notification.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!