Made AddMessage method work cross-thread and on same thread