473,322 Members | 1,614 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Program without window

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
11 2185
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tian | last post by:
In Windows, I have been simply using os.system() to run command line program in python. but there will be a black console window. How can I run the program without invoking that window? i guess...
3
by: Daragoth | last post by:
Hi, I'm writing a program using Metrowerks CodeWarrior 4.0 that determines the best possible combination of a data set by checking every possible combination. I found there were about 250,000,000...
1
by: Tony Johansson | last post by:
Hello experts! As this program is now it's works perfectly when running as a application or as an Applet. Now to my question if I just change this row "public class Converter extends Applet "...
2
by: Maryam | last post by:
Is a split window possible for an MS DOS program and MS Access program?? If so how??? When you run a DOS programn it covers the whole of the PC screen and if you have other applications you...
8
by: Quentin Huo | last post by:
Hi: I want to run cacls.exe to check the user right from an ASPX page. In ASP, I can do: Set wshobj=Server.CreateObject("WScript.Shell") resobj=wshobj.Run("cmd /c echo Y| cacls c:", 0, True)...
19
by: ern | last post by:
Right now I'm using exit(0) to terminate my program. My program is a console .exe application. After the "exit(0)" line of code is encountered, the console application waits for an enter press,...
22
by: JoeC | last post by:
I am working on another game project and it is comming along. It is an improvment over a previous version I wrote. I am trying to write better programs and often wonder how to get better at...
2
by: TonyJ | last post by:
Hello!! I'm supposed to write a program that modify a file with data that has been entered in the installation program(inno setup). This program will start after the install file has been...
5
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Dear all, I'd like to know if there is any method to minimize command mode window when a console program is running. In my case, there are several console programs which run periodically in...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.