What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Change window caption, not with SetWindowText!!!

Change window caption, not with SetWindowText!!!
Author: Message:
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Change window caption, not with SetWindowText!!!
You'll have to use Active Accessibility to obtain, not a handle, but an interface to the caption. You can get an IAccessible interface from an HWND, and from that, obtain the IAccessible for the caption. Accessibility Explorer will help you here (it's an MS development tool).
Once you have the caption's IAccessible, I believe the method is called acc_SetText(). As it's a COM interface, it'll require you to pass a BSTR. A hack is to pass a wchar_t pointer, but be warned: as a wchar_t* isn't a fully-defined BSTR, the code may not be perfectly stable.

Of course, if this is going to be entirely in JScript, all strings are BSTR by default ;)
[Image: spartaafk.png]
08-09-2006 02:42 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Change window caption, not with SetWindowText!!! - by Shondoit on 08-09-2006 at 11:05 AM
RE: Change window caption, not with SetWindowText!!! - by RaceProUK on 08-09-2006 at 02:42 PM
RE: Change window caption, not with SetWindowText!!! - by Shondoit on 08-09-2006 at 02:50 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On