Click to See Complete Forum and Search --> : Get window name


Trainwreck
July 22nd, 2006, 02:03 PM
Hello, how can i get the name of the window that has currently focus??
And please no MFC codes...

Mitsukai
July 22nd, 2006, 02:13 PM
search msdn for the function GetFocusedWindowName()

Trainwreck
July 22nd, 2006, 02:22 PM
Are you sure about that, cause this is the result i get

There are no search results to display.

Even google doesnt show anything usefull

golanshahar
July 22nd, 2006, 02:46 PM
Hello, how can i get the name of the window that has currently focus??
And please no MFC codes...


Look at:

::GetForegroundWindow () (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getforegroundwindow.asp)
::GetWindowText() (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getwindowtext.asp).




Cheers

ovidiucucu
July 23rd, 2006, 06:03 AM
[ Moved thread ]

/please post this type of problems (WinAPI, no MFC) here.

humptydumpty
July 24th, 2006, 12:21 AM
GetActiveWindow() and GetWindowText()
Thanx

scathenC
July 27th, 2006, 12:48 PM
const int MAX_BUFFER = 256;
char buffer[MAX_BUFFER];
GetWindowText(GetFocus(),buffer,MAX_BUFFER);