From: sbelmont700@gmail.com
Subject: Re: Problems with the "mwindows" switch
Date: Fri, 22 May 2015 12:24:30 -0700 (PDT)
Date: 2015-05-22T12:24:30-07:00 [thread overview]
Message-ID: <00836c9e-9ed0-4638-9d0b-0b3cd4e07c65@googlegroups.com> (raw)
In-Reply-To: <df2d79a4-b792-49f4-b941-712772dee4e9@googlegroups.com>
On Friday, May 22, 2015 at 2:35:59 PM UTC-4, NiGHTS wrote:
>
> Any hints on what could be wrong is be highly appreciated!
>
A Win32 executable is either 'console' or 'windows' (CUI or GUI). This is, effectively, what the -mwindows switch controls, with its omission indicating CUI.
Essentially, a CUI executable gets its standard output handle from its parent console; so if you spawn a CUI from the shell, it uses the same console for output, and you get it in the same window as the shell. Not so with a GUI app, that has no default output, and would open a new window should you try (via AllocConsole()).
So, if you use the -mwindows switch, you get no default console and your text goes nowhere. If you remove it, you will always get a console whether you want it or not. There is, officially, no way to create a windows executable that is dynamically both.
There is probably a more subtle reason as to why your GUI doesn't appear when -mwindows is present.
(http://blogs.msdn.com/b/oldnewthing/archive/2009/01/01/9259142.aspx)
-sb
next prev parent reply other threads:[~2015-05-22 19:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 18:35 Problems with the "mwindows" switch NiGHTS
2015-05-22 19:24 ` sbelmont700 [this message]
2015-05-22 19:51 ` NiGHTS
2015-05-23 5:33 ` Dmitry A. Kazakov
2015-05-23 7:20 ` NiGHTS
2015-05-23 8:06 ` Dmitry A. Kazakov
2015-05-28 22:19 ` Randy Brukardt
2015-05-28 23:49 ` sbelmont700
2015-05-29 21:24 ` Randy Brukardt
2015-05-29 21:36 ` Jeffrey R. Carter
2015-05-29 22:10 ` Simon Wright
2015-05-30 0:08 ` Dennis Lee Bieber
2015-06-01 21:24 ` Randy Brukardt
2015-06-01 23:12 ` sbelmont700
2015-05-29 11:00 ` Björn Lundin
2015-05-23 20:23 ` gautier_niouzes
2015-06-02 22:33 ` NiGHTS
2015-06-03 6:42 ` Simon Wright
2015-06-03 8:27 ` J-P. Rosen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox