get window title
I have the window process handle and id, how would I get the window title?
6 replies
Ok I have and I’ve found this and added in to my code so like:
- char buffer[65536];
- ProcInfo *p = new ProcInfo();
- HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS,FALSE,entry.th32ProcessID);
- int txtlen=GetWindowTextLengthW(hProc);
- GetWindowText(hProc, buffer, txtlen);
Error is on line 4:
invalid conversion from ‘void*’ to ‘HWND__*’
Someone told me I would find it easy learning C++ already knowing C# pretty well, but most of this just doesn’t seem to make any sense :/
Oh… I’m was mistake too. I hate winapi :)
I did google very long and…
NOT simple ways get HWND from HANDLE
But I find difficult way, may be you can repeat this for your program.
http://www.codeguru.com/forum/showpost.php?p=1213838&postcount=3
It’s really stupid crazy method. But I’m not found anymore.
So, now I understand why Win developer hate C++ – winapi is unbelievable crap.
Hey, go to Linux – go to dark side – we still have cookies. :D
You must log in to post a reply. Not a member yet? Register here!


