you can try out the "SetWindowText" user32 function.
jscript code:
Interop.Call("user32","SetWindowTextW",hWnd,"new window title");
example:
jscript code:
function OnEvent_ChatWndCreated(ChatWnd){
var contact;
for(e=new Enumerator(ChatWnd.Contacts);!e.atEnd();e.moveNext())contact=e.item();
Interop.Call("user32","SetWindowTextW",ChatWnd.handle,MsgPlus.RemoveFormatCodes(Messenger.MyName)+": "+MsgPlus.RemoveFormatCodes(contact.name));
}