I am a Python developer with a little knowledge of C++.
With that said, I would like to understand how I can right click on a system tray icon, and click on one of the options on the context menu.
I have looked around the internet and was unable to find something that can get me the location of the system tray icons relative to the 'Notification Area'. Also, I can get the Button text of the tray icon.
I get the handle of ToolbarWindow32
using FindWindowEx
.
I have tried to send WM_RBUTTONDOWN
and WM_RBUTTONUP
to the handle of ToolbarWindow32
with the X and Y coordinates, using SendMessage
and nothing happens.
I am completely oblivious as to how I can right click the icon, and get the context menu information, and using that, click on one of the options.