public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: jim@nga.com (Jim Roy)
To: cygwin@sourceware.cygnus.com
Subject: console window on demand?
Date: Tue, 10 Aug 1999 16:56:00 -0000	[thread overview]
Message-ID: <9908102356.AA14944@nga.nga.com> (raw)

I there any way to get a console window "on demand"?

I have a simple character based program that I am trying to 
port to windows.  It is executed from a third party shell.
Under X, it pops an xterm when it actually writes output, but
does not if no output is produced.  I can't seem to get similar
behavior in windows.

If I compile it as a "console" pgm, ie without -mwindows, then
printf() etc all function as expected and life is good.  Except
that a window pops up on startup, even if no actual output is
produced.

If I compile it as a "GUI" pgm, I lose the gratituitous startup
window, but console I/O has to be done via windows API calls.

Am I missing something here?  Is there a way to use printf() &
friends in a GUI setting?  Or better yet, is there a way to
start a "console" mode pgm without an attached console, and have
it be created with the first I/O opperation?

Thanks for your time,

Jim Roy

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

WARNING: multiple messages have this Message-ID
From: jim@nga.com (Jim Roy)
To: cygwin@sourceware.cygnus.com
Subject: console window on demand?
Date: Tue, 31 Aug 1999 23:49:00 -0000	[thread overview]
Message-ID: <9908102356.AA14944@nga.nga.com> (raw)
Message-ID: <19990831234900.1l-E8MGNIHxVnSHwOzcKXdEtftlhcq17sMcTPq8b0E8@z> (raw)

I there any way to get a console window "on demand"?

I have a simple character based program that I am trying to 
port to windows.  It is executed from a third party shell.
Under X, it pops an xterm when it actually writes output, but
does not if no output is produced.  I can't seem to get similar
behavior in windows.

If I compile it as a "console" pgm, ie without -mwindows, then
printf() etc all function as expected and life is good.  Except
that a window pops up on startup, even if no actual output is
produced.

If I compile it as a "GUI" pgm, I lose the gratituitous startup
window, but console I/O has to be done via windows API calls.

Am I missing something here?  Is there a way to use printf() &
friends in a GUI setting?  Or better yet, is there a way to
start a "console" mode pgm without an attached console, and have
it be created with the first I/O opperation?

Thanks for your time,

Jim Roy

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

             reply	other threads:[~1999-08-10 16:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-10 16:56 Jim Roy [this message]
1999-08-10 17:30 ` Josh Baudhuin
1999-08-31 23:49   ` Josh Baudhuin
1999-08-31 23:49 ` Jim Roy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9908102356.AA14944@nga.nga.com \
    --to=jim@nga.com \
    --cc=cygwin@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).