Click to See Complete Forum and Search --> : How to get window caption?


Goddoes
January 14th, 2010, 02:53 AM
Hi!

I have problems with GetWindowText function from WinAPI.
I need to read window caption, I get window hwnd without any problems, but with GetWindowText I get buit-in caption (window text), but I need real one, which is depends on loged in user, example:
Buit-in Caption text = "BackOffice"
Caption with loged-in user = "GreatHotel - Administrator"

With SPY++ I can see "GreatHotel - Administrator", but with GetWindowText I got "BackOffice".
Can anyone help?

Thanks in advance :)

olivthill2
January 14th, 2010, 09:47 AM
Try InternalGetWindowText()
See http://msdn.microsoft.com/en-us/library/ms633523(VS.85).aspx

Goddoes
January 14th, 2010, 02:07 PM
Thanks, I found the solution