5 out of 9 rated this helpful - Rate this topic

GetConsoleWindow function

Applies to: desktop apps only

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: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Visual Basic 9 Declaration
Public Declare Function GetConsoleWindow Lib "Kernel32.dll" () As IntPtr