Ethereal-dev: Re: [Ethereal-dev] Why a GUI app?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Ulf Lamping" <ulf.lamping@xxxxxx>
Date: Tue, 4 Nov 2003 10:03:05 +0100
> Date: Mon, 3 Nov 2003 18:08:04 +0100
> From: "Gisle Vanem" <giva@xxxxxxxxx>
> Subject: [Ethereal-dev] Why a GUI app?
> To: <ethereal-dev@xxxxxxxxxxxx>
> 
> Why do we link the MSVC version of ethereal as a GUI app
> with link option "/subsystem:windows"? 
> 
> It's much easier to use "/subsystem:console". This automatically 
> gives us a console instead of trying to use AllocConsole() and
> sync stdio/stdout with that.
> 
> Besides the Glib/GTK asserts etc, is a console strictly required? 

The preferences and some dissectors are also put some messages to the console.
> 
> With "/subsystem:console" or "-Wl,--subsystem,console" for gcc
> and started from a cmd-line, "ethereal -v" prints to current shell.
> 
> If started from Explorer or a short-cut, "ethereal -v" prints to 
> a new console created for us. Only a small cosmetic problem
> is that the new console is created before the main GTK window,
> and then put behind that.
> 
> I've made a small function to check the sub-system in case
> makefile used the wrong setting. But I'd like to hear some views
> on this.
> 
> --gv
> 

Usually on MS windows, the user doesn't want a console at all. 
So in both ways (gui or console app),  you have to do something.

Using gui app, you have to create a console for special output (as you described).

Using a console app, you have to usually hide the console, when no messages
appear, showing only the GUI window.

When started as a console app, it's not easy to get rid of the console, to not appear 
on the screen, task manager, task switch, ...

Regards, ULFL
______________________________________________________________________________
Bestes Testergebnis: Stiftung Warentest Doppelsieg fur WEB.DE FreeMail
und WEB.DE Club. Nur fuer unsere Nutzer! http://f.web.de/?mc=021182