Since this seems to be a frequently asked question, I'll spend some time explaining this a bit more in depth...
When working with objects, you have to understand the difference between classes (or instances) and singletons (static objects).
- Class instances are objects which represent an instance of something to communicate with it through its properties and methods.
The reason why you can't use ChatWnd.SendMessage directly is because SendMessage() needs to communicate with a certain window, but none was specified. You first need to retrieve an instance in some way before working with it. For example, you can get a ChatWnd instance by calling Messenger.OpenChat, but you can also get one by looping through the Messenger.CurrentChats collection or through the ChatWnd parameter of an event. Once you got an instance, you're ready to go.
Examples: ChatWnd, PlusWnd, Contact, Emoticon, DataBloc,...
- Singletons are objects that are global (accessible from everywhere in the script) and provide methods and properties without being assigned to one instance. There is only one instance of these objects and you can't create new instances of them.
The Messenger object for example has a MyName property which always represents the current user's nickname. It doesn't need to know what instance to communicate with, since it's always the same: the name of the currently logged in user (unless the current user is not signed in, but then there's nothing to work with).
Examples: Debug, Messenger, MsgPlus and Interop.
Hopefully that was helpful.