[Update]
I found out what the problem is. Apparently, ONLY main windows[top level] would be able to receive the messages. Child windows and apparently some windows types simply don't have the ability to receive messages.
This should work :
[
^]
If it is not working, then I would suggest you check if the window is getting created. Chances are it is failing once you register for the messages. [It calls NCCreate followed by NCDestroy]. I dunno how to make it work [I got a link which had same issue but hit a dead end there] but a way around is using the main window.
Hope that helps someone, somewhere and saves a day :-D