Thanks a lot. It helped me to get started. Now I can handle any messages of the classes that are included in my project. Now I need to find out how to handle a message that is not included in my project (just some class from the library) in my case it is CSockets. I should be able to get it. Thanks again. Best regards, Andrew