comp.lang.ada
 help / color / mirror / Atom feed
* Re: GtkAda and CommandWindow on Windows system
       [not found] <4d50269c$0$8932$703f8584@textnews.kpn.nl>
@ 2011-02-07 17:17 ` Dmitry A. Kazakov
  2011-02-07 18:44   ` Yannick Duchêne (Hibou57)
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry A. Kazakov @ 2011-02-07 17:17 UTC (permalink / raw)


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

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GtkAda and CommandWindow on Windows system
  2011-02-07 17:17 ` GtkAda and CommandWindow on Windows system Dmitry A. Kazakov
@ 2011-02-07 18:44   ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 2+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-02-07 18:44 UTC (permalink / raw)


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]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-07 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox