GetActiveWindow function
Retrieves the window handle to the active window attached to the calling thread's message queue.
Syntax
HWND WINAPI GetActiveWindow(void);
Parameters
This function has no parameters.
Return value
Type: HWND
The return value is the handle to the active window attached to the calling thread's message queue. Otherwise, the return value is NULL.
Remarks
To get the handle to the foreground window, you can use GetForegroundWindow.
To get the window handle to the active window in the message queue for another thread, use GetGUIThreadInfo.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Reference
- GetForegroundWindow
- GetGUIThreadInfo
- SetActiveWindow
- Conceptual
- Keyboard Input
Show: