title: Setting up Hook on Windows messages
body: <p>I am trying to make an application which will notify current playing track's
  name and artist to the user for that I need to monitor the <code>track change event</code>.</p>
  
  <p>I used <code>Winspector</code> and found out that whenever there is a track change in
  spotify <code>WM_SETTEXT</code> message is send.</p>
  
  <p><img src="https://i.stack.imgur.com/rl3Mf.jpg" alt="enter image description here"></p>
  
  <p>For this I believe I have to set up a <code>HOOK</code> through my application to look for <code>WM_SETTEXT</code> message sent by the other application.</p>
  
  <p>Now, the problem I am facing is I am not able to get any working sample code to work with. I read the documentation of <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990%28v=vs.85%29.aspx" rel="noreferrer">setwindowshookex</a> and also did some googling but am really lost as I have no background of C# and handling windows messages/events.</p>
  
  <p>So, If you guys can provide me a small working code to wrap my head around <code>setting up hook</code> on another application or if you can direct me to some nice article on how to achieve this.</p>