title: Simulating right click on system tray icon and clicking on context menu in C++
body: <p>I am a Python developer with a little knowledge of C++.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>I get the handle of <code>ToolbarWindow32</code> using <code>FindWindowEx</code>.</p>
  
  <p>I have tried to send <code>WM_RBUTTONDOWN</code> and <code>WM_RBUTTONUP</code> to the handle of <code>ToolbarWindow32</code> with the X and Y coordinates, using  <code>SendMessage</code> and nothing happens.</p>
  
  <p>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.</p>