By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,213 Members | 1,117 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,213 IT Pros & Developers. It's quick & easy.

Program without window

P: n/a
A very silly question which I never could answer to:
How to create a simple Win32 program that doesn't show any window
(neither minimized)
the easiest way?
Jan 30 '08 #1
Share this Question
Share on Google+
11 Replies


P: n/a
CP************@gmail.com wrote:
A very silly question which I never could answer to:
How to create a simple Win32 program that doesn't show any window
(neither minimized)
the easiest way?
This is windows specific and hence a platform specific question.

On most systems (other than windows), you have to specifically
initialize the window to display a window. In win32, you have to
compile it differently and I think the entry point is not main, it's
somthing else, I can't remember at the moment.

Jan 30 '08 #2

P: n/a
CP************@gmail.com wrote:
A very silly question which I never could answer to:
How to create a simple Win32 program that doesn't show any window
(neither minimized)
the easiest way?
In C:

#include <stdio.h>

int main(void)
{
printf("This is a program that doesn't display any window\n");
}
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Jan 30 '08 #3

P: n/a
jacob navia wrote:
CP************@gmail.com wrote:
>A very silly question which I never could answer to:
How to create a simple Win32 program that doesn't show any window
(neither minimized)
the easiest way?

In C:

#include <stdio.h>

int main(void)
{
printf("This is a program that doesn't display any window\n");
}
In C? Looks like a C++ program to me...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jan 31 '08 #4

P: n/a
int main(void)
{
printf("This is a program that doesn't display any window\n");
return 0; // return missing
>
}
This program will run in console window (or create one if lunched
directly). There are many ways to do windowless programs. You may
run it as service or have main window hidden, or show as an icon on
launchpad. Really should go to Windows API forum.

George
Jan 31 '08 #5

P: n/a
gp***@axonx.com wrote:
>int main(void)
{
printf("This is a program that doesn't display any window\n");
return 0; // return missing
>}

This program will run in console window (or create one if lunched
directly). There are many ways to do windowless programs. You may
run it as service or have main window hidden, or show as an icon on
launchpad. Really should go to Windows API forum.

George
It will not create any console window if you compile it as a windows
program.

If it is launched from an existing console window it will show the
message, if it is launched from the desktop you will not see anything.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Jan 31 '08 #6

P: n/a
jacob navia wrote:
gp***@axonx.com wrote:
>>int main(void)
{
printf("This is a program that doesn't display any window\n");
return 0; // return missing
>>}

This program will run in console window (or create one if lunched
directly). There are many ways to do windowless programs. You may
run it as service or have main window hidden, or show as an icon on
launchpad. Really should go to Windows API forum.

George

It will not create any console window if you compile it as a windows
program.

If it is launched from an existing console window it will show the
message, if it is launched from the desktop you will not see anything.
It will create a window depending on how it is launched and how it is
compiled.
Jan 31 '08 #7

P: n/a
Gianni Mariani wrote:
jacob navia wrote:
>gp***@axonx.com wrote:
>>>int main(void)
{
printf("This is a program that doesn't display any
window\n");
return 0; // return missing
}

This program will run in console window (or create one if lunched
directly). There are many ways to do windowless programs. You may
run it as service or have main window hidden, or show as an icon on
launchpad. Really should go to Windows API forum.

George

It will not create any console window if you compile it as a windows
program.

If it is launched from an existing console window it will show the
message, if it is launched from the desktop you will not see
anything.

It will create a window depending on how it is launched and how it is
compiled.
I believe it's the system that creates a window to run a program built
for "console" subsystem, not the program itself.

And why are we talking about it?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jan 31 '08 #8

P: n/a
Victor Bazarov wrote:
>
I believe it's the system that creates a window to run a program built
for "console" subsystem, not the program itself.

And why are we talking about it?
I do not know :-)

But now that you are around, why is my example program C++ and NOT
just plain C?

It doesn't use any specific C++ constructs

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Jan 31 '08 #9

P: n/a
jacob navia wrote:
Victor Bazarov wrote:
>>
I believe it's the system that creates a window to run a program
built for "console" subsystem, not the program itself.

And why are we talking about it?

I do not know :-)

But now that you are around, why is my example program C++ and NOT
just plain C?

It doesn't use any specific C++ constructs
I didn't say it was *not* "just plain C". It is a valid program in
both languages. But why in hell would you want to post a C program
here?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jan 31 '08 #10

P: n/a
Victor Bazarov wrote:
jacob navia wrote:
>Victor Bazarov wrote:
>>I believe it's the system that creates a window to run a program
built for "console" subsystem, not the program itself.

And why are we talking about it?
I do not know :-)

But now that you are around, why is my example program C++ and NOT
just plain C?

It doesn't use any specific C++ constructs

I didn't say it was *not* "just plain C". It is a valid program in
both languages. But why in hell would you want to post a C program
here?

V
I apologize for my heresy.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Jan 31 '08 #11

P: n/a
On Jan 31, 1:15 pm, jacob navia <ja...@nospam.comwrote:
Victor Bazarov wrote:
jacob navia wrote:
Victor Bazarov wrote:
I believe it's the system that creates a window to run a program
built for "console" subsystem, not the program itself.
>And why are we talking about it?
I do not know :-)
But now that you are around, why is my example program C++ and NOT
just plain C?
It doesn't use any specific C++ constructs
I didn't say it was *not* "just plain C". It is a valid program in
both languages. But why in hell would you want to post a C program
here?
V

I apologize for my heresy.
troll +__+
Jan 31 '08 #12

This discussion thread is closed

Replies have been disabled for this discussion.