Jump to content
  • Advertisement
Sign in to follow this  
curtmax_0

Window titles

This topic is 4551 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!