Thanks Igor, I tried searching with "system tray WM_" and i found out that if I

1.) #define WM_NOTIFYICON WM_USER+1
2.) nid.uCallbackMessage = WM_NOTIFYICON
3.) ON_MESSAGE(WM_NOTIFYICON, OnTrayNot)

the messages start getting captured.