How To Obtain a Console Window Handle (HWND) (124103)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0
This article was previously published under Q124103 SUMMARY
It may be useful to manipulate a window associated with a console
application. The Win32 API provides no direct method for obtaining the
window handle associated with a console application. However, you can
obtain the window handle by calling FindWindow(). This function retrieves a
window handle based on a class name or window name.
Call GetConsoleTitle() to determine the current console title. Then supply
the current console title to FindWindow().
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbhowto kbWndw KB124103 |
---|
|