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!news4.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: Fri, 24 Jun 2005 20:44:43 -0500 From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: HWND of the console Date: Fri, 24 Jun 2005 18:46:07 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: <3sSdnU0MwKaWKiHfRVn-vw@comcast.com> NNTP-Posting-Host: 24.22.63.157 X-Trace: sv3-zww6VMuyJfRksSqsfQb3bUBqRTtxJ2zwPottBbfltkt7hD+39KIeeUZekW/0/JTUA8hW42clu3Bk88Y!x/kM/R0MD3KXkVzQwIJ5p8C7yZlOKYiMG/PthnqN2QURmhmTvxQljnS2DNmH 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:11635 Date: 2005-06-24T18:46:07-07:00 List-Id: "Sylvain" wrote in message news:e465bcf0.0506240556.7a08f26a@posting.google.com... > 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. > > > Thank you ! Bye ! WinBase.GetStdHandle( WinBase.STD_OUTPUT_HANDLE ) Sample code: PROCEDURE CursorPosnTIF( row, col : Natural ) IS result : Win32.BOOL; toRow : Natural := Natural'MAX( row, 1 ); toCol : Natural := Natural'MAX( col, 1 ); BEGIN result := WinCon.SetConsoleCursorPosition( WinBase.GetStdHandle( WinBase.STD_OUTPUT_HANDLE ), WinCon.COORD'( X => Win32.Short( toCol - 1 ), y => Win32.Short( toRow - 1 ) ) ); END CursorPosnTIF; Note: This only works for the console window. Steve (The Duck)