A handful of people here have the knowledge of hooking the process pages of the application. The publically known way is using ActiveAccessibility but this will only give you the handle to read the contents of the chat history box but it is readonly.
matty's reply to Active Accessibility for incoming messages