GetConsoleWindow Function

Retrieves the window handle used by the console associated with the calling process.

Syntax

C++
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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWincon.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

Console Functions

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags :


Community Content

kramerkramer
Example
An example to clarify would be nice.
Tags :

Đonny
Visual Basic 9 Declaration
Public Declare Function GetConsoleWindow Lib "Kernel32.dll" () As IntPtr

Page view tracker