comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: GtkAda and CommandWindow on Windows system
Date: Mon, 07 Feb 2011 19:44:42 +0100
Date: 2011-02-07T19:44:42+01:00	[thread overview]
Message-ID: <op.vqjqcsn5ule2fv@garhos> (raw)
In-Reply-To: 3y01lulj9gjv.1pfxrwnvxpmwd.dlg@40tude.net

Le Mon, 07 Feb 2011 18:17:55 +0100, Dmitry A. Kazakov  
<mailbox@dmitry-kazakov.de> a écrit:

> 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 “MS-DOS”window
>> At least I want to close both windows at the same time but if possible  
>> 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 <other-options> & "-mwindows";
>    end Linker;
>
> If you rather are using gnatmake do not forget to add to -largs
> <other-options>:
>
>    -mwindows

Yes.

Also another tip, if you meet the same with a binary distribution and you  
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 bytes  
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 bytes  
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’est pas pour  
les chiens.

“I am fluent in ASCII” [Warren 2010]



      reply	other threads:[~2011-02-07 18:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4d50269c$0$8932$703f8584@textnews.kpn.nl>
2011-02-07 17:17 ` GtkAda and CommandWindow on Windows system Dmitry A. Kazakov
2011-02-07 18:44   ` Yannick Duchêne (Hibou57) [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox