• Advertisement
Sign in to follow this  

Window titles

This topic is 4368 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to grab the text in the title bar of various open windows. I can't use FindWindow because the text is going to be different (i'm trying to get text from open instances of Firefox actually). Findwindow is supposed to be evil anyways... I tried using GetWindow but it's just returning rubbish, let alone borking when I use GetWindowText on the handle. Does anybody know a good reference for this type of thing? (not google or msdn.. i've already looked) I might just actually make a firefox plugin to output the title somehow (although I haven't read the firefox extension docs yet so i dunno if it's possible :/) Anyways, thanks in advance for info :)

Share this post


Link to post
Share on other sites
Advertisement
Use EnumWindows to enumerate all top level windows. This will not list the hidden windows but should suffice for all visible apps.

From the HWNDs you get you can work your way down in the hierarchy with GetWindow. To be on the safe side when using GetWindowText from other apps you may have to use global allocated memory (GlobalAlloc).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement