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,e1489c24f38e1361 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: GtkAda and CommandWindow on Windows system Date: Mon, 07 Feb 2011 19:44:42 +0100 Organization: Ada @ Home Message-ID: References: <4d50269c$0$8932$703f8584@textnews.kpn.nl> <3y01lulj9gjv.1pfxrwnvxpmwd.dlg@40tude.net> NNTP-Posting-Host: zEckrmJMt9EFPB3MmJfMTg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.01 (Win32) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:16945 Date: 2011-02-07T19:44:42+01:00 List-Id: Le Mon, 07 Feb 2011 18:17:55 +0100, Dmitry A. Kazakov = a =C3=A9crit: > On Mon, 7 Feb 2011 18:06:32 +0100, ldries46 wrote: > >> When I am running a Ada Program which uses GtkAda. I get at least two= = >> windows: >> 1.. The Window of the program created by GtkAda and >> 2.. The Command Window or =E2=80=9CMS-DOS=E2=80=9Dwindow >> At least I want to close both windows at the same time but if possibl= e = >> do not create the MS Dos window. How can I do that? >> As IDE I do use GPS. > > This is not specific to GtkAda, just general Windows issue. The = > application > should be flagged as a GUI one. To do this in your GNAT project file > (*.gpr) you should have: > > package Linker is > for Default_Switches ("ada") use & "-mwindows";= > end Linker; > > If you rather are using gnatmake do not forget to add to -largs > : > > -mwindows Yes. Also another tip, if you meet the same with a binary distribution and yo= u = do not have the source or don't want to recompile (because too complex) = : = open the binary in an hexadecimal editor, go to 16#3C#, get the two byte= s = words located there, add 16#5C# to that two bytes word, and go to that = address (the one resulting from the sum). There, you will see a two byte= s = words which is probably set to 1. Set it to 3 (and save the binary file)= , = then no more console will be opened at the application startup. Note: some times, this console may display relevant informations about = what's going on, especially at startup. If the application is not well = tested or is a kind of beta or alpha, it's better to have a console and = = not to get ride of it. -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens. =E2=80=9CI am fluent in ASCII=E2=80=9D [Warren 2010]