Retrieves the window handle used by the console associated with the calling process.
Syntax
HWND WINAPI GetConsoleWindow(void);
Parameters
This function has no parameters.
Return Value
The return value is a handle to the window used by the console associated with the calling process or NULL if there is no such associated console.
Remarks
To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see
Using the Windows Headers.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | Wincon.h (include Windows.h) |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
See Also
- Console Functions
Send comments about this topic to Microsoft
Build date: 11/19/2009