How can I read notifyIcon.Text from another application? I found Shell_NotifyIcon Function [http://msdn.microsoft.com/en-us/library/bb762159%28VS.85%29.aspx%5D but I don’t know how to use it this way.
How can I read notifyIcon.Text from another application? I found Shell_NotifyIcon Function [ http://msdn.microsoft.com/en-us/library/bb762159%28VS.85%29.aspx]
Share
You can’t use that API (Shell_NotifyIcon) to read the tool tip text of a notification icon from another process. There is no documented way to do this.
You can install a global message hook and watch for WM_COPYDATA messages sent to windows with the Shell_TrayWnd class. When the dwData member of the COPYDATASTRUCT is SH_TRAY_DATA then the lpData member points to a SHELLTRAYDATA structure which contains a copy of the NOTIFYICONDATA structure that you can extract the tool tip from.