Do you mean changing the titlebar caption of the window?
code:
function SetWindowText(hWnd, sText){
Interop.Call('user32', 'SetWindowTextW', hWnd, sText);
}
Usage would be something like this
code:
var pChatWnd = MsgPlus.CreateWnd('xmlfile', 'WindowId')
SetWindowText(pChatWnd.Handle, 'new text');
Should work, like most scripts I post I can't test it as I am at work not home.