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 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!newsgate.cistron.nl!feeder1.cambrium.nl!feed.tweaknews.nl!195.238.0.32.MISMATCH!skynet.be!skynet.be!newspost001!tjb!not-for-mail Date: Fri, 24 Jun 2005 16:25:41 +0200 From: Adrien Plisson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: fr-fr, fr-be, fr, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: HWND of the console References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42bc1772$0$24327$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: c84b2c67.news.skynet.be X-Trace: 1119623026 news.skynet.be 24327 81.246.238.36:3618 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news1.google.com comp.lang.ada:11620 Date: 2005-06-24T16:25:41+02:00 List-Id: Sylvain wrote: > Hi, > Can you give me a piece of code which give me the HWND of the current > console window given by default by Adagide in the Gnat environment > with the only add-on called "Win32ADA", please. > from the MSDN : "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. " IMHO, the method they describe in the article is risky. i can think of 2 other methods to get the HWND but they are risky as well ! OTOH, i can't see anything useful in retrieving the HWND of a console application... may we have more information on the purpose of this request ? > Thank you ! Bye ! -- rien