-
May 6th, 2007, 11:49 AM
#1
Thread Starter
New Member
-
May 7th, 2007, 12:25 AM
#2
Re: Get focused window title/caption in C++ ?
In Windows:
Code:
#include <windows.h>
// ...
TCHAR buf[255];
GetWindowText(GetForegroundWindow(), buf, 255);
Last edited by penagate; May 7th, 2007 at 12:29 AM.
-
May 7th, 2007, 09:59 AM
#3
Thread Starter
New Member
Re: Get focused window title/caption in C++ ?
Originally Posted by penagate
In Windows:
Code:
#include <windows.h>
// ...
TCHAR buf[255];
GetWindowText(GetForegroundWindow(), buf, 255);
thx for the reply
but i don't know how to use this code to get the focused window title into my text box or any other output way
-
May 7th, 2007, 12:13 PM
#4
Fanatic Member
Re: Get focused window title/caption in C++ ?
What don't you understand? Basically the code he gave you calls a windows API function and shoves the output into a buffer that he has named "buf." The buffer is just an array of TCHARs which you can use in whatever manner you need.
"X-mas is 24.Desember you English morons.." - NoteMe
-
May 7th, 2007, 12:34 PM
#5
Thread Starter
New Member
Re: Get focused window title/caption in C++ ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|