From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,418d181840caa832 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 25 Jun 2005 20:05:36 -0500 From: "Steve" Newsgroups: comp.lang.ada References: <3sSdnU0MwKaWKiHfRVn-vw@comcast.com> <42bd0802$0$24266$ba620e4c@news.skynet.be> Subject: Re: HWND of the console Date: Sat, 25 Jun 2005 18:07:02 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: NNTP-Posting-Host: 24.22.63.157 X-Trace: sv3-L0npixSpmL0iWJB6F4L5kdLenrrY5oCyE5BODbxCMqXohDG1SGAltf4OMEhhDr4PetlbbmisRIzLTJJ!fJ79rF8EdXRXTYMs4wJFZq5zOk3CwtvQsuFSTmx8KE31XB/sAKVRwpuXLy+3 X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:11656 Date: 2005-06-25T18:07:02-07:00 List-Id: "Adrien Plisson" wrote in message news:42bd0802$0$24266$ba620e4c@news.skynet.be... > Steve wrote: >> WinBase.GetStdHandle( WinBase.STD_OUTPUT_HANDLE ) > > this does not return a WINDOW handle (HWND) but a DEVICE handle. the > return value of this function cannot be used in function taking a HWND as > a parameter. > > -- > rien > Then try "GetConsoleWindow" defined in Kernel32.lib. Requires W2K or XP. In the SDK documentation: HWND GetConsoleWindow(void); The GetConsoleWindow function retrieves the window handle used by the console associated with the calling process. Steve (The Duck)