Yes, I have no windows. 
Author Message
 Yes, I have no windows.

Hello

I have the opinion that every running program has a window,
regardless of whether the programmer created a window or
not.  I know that in VB even if I create an app without a form
and specify unattended execution I still get a window with
the exe name ( test.exe gives a window title of test).
I've used that window handle and sent a WM_CLOSE to it
that worked.
Someone said that in C you can create apps without windows.  If so
can anyone email me a .exe that runs without creating a window and
handle.

Can anyone shed any light on this.

I know I'm more likely wrong than right but I would like some
definitive facts.

Best wishes, Murray



Wed, 31 Jan 2001 03:00:00 GMT  
 Yes, I have no windows.
How 'bout creating a hidden window. It's true though that VB needs to have
one window open.

Andre'

Quote:

>Hello

>I have the opinion that every running program has a window,
>regardless of whether the programmer created a window or
>not.  I know that in VB even if I create an app without a form
>and specify unattended execution I still get a window with
>the exe name ( test.exe gives a window title of test).
>I've used that window handle and sent a WM_CLOSE to it
>that worked.
>Someone said that in C you can create apps without windows.  If so
>can anyone email me a .exe that runs without creating a window and
>handle.

>Can anyone shed any light on this.

>I know I'm more likely wrong than right but I would like some
>definitive facts.

>Best wishes, Murray



Wed, 31 Jan 2001 03:00:00 GMT  
 Yes, I have no windows.


 It's true though that VB needs to have

Quote:
>one window open.

>Andre'

Are you sure about this?  I created a program in VB3 using the Sub Main and *no* form at all;  It ran fine.  Does this mean that my program actually registered a window class but did not instantiate it or, at least, did not show it?  (I had *no* form in my program...only the one module with Sub Main.)


"For God So Loved The World, That He Gave His
 Only Begotten Son, That Whosoever Believeth
 In Him Should Not Perish, But Have Everlasting
 Life"John3:16  * http://pw2.netcom.com/~cbrtjr/wrdthing.html *



Wed, 31 Jan 2001 03:00:00 GMT  
 Yes, I have no windows.
Hello

Exactly. At least in VB5.  It creates a hidden window with the title
'Test' if the ..exe is called 'Test.exe'. If you have Microsoft's spy
then you can actually see it as I have.  Now, does the same thing
happen with a C or C++ program?

Best wishes,

Murray



Thu, 01 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.

(Murray Thayer) schreibt:

Quote:
>I know that in VB even if I create an app without a form
>and specify unattended execution I still get a window with
>the exe name

I happened to find some (obscure) properties of the App object. Perhaps you
should study these, "TaskVisible" might be the answer to your question.

DoDi



Fri, 02 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.
Your machine is full of them! Check your "/Windows/Command/" or
"/Windows/System32/" folder. See all those EXE's? Basicaly all those
programs that run in a command window (or from the "DOS" prompt) are
"windowless".  They have no window handle and no windows message pump. A few
examples:

    Deltree.exe
    Attrib.exe
    Find.exe
    Sort.exe

They may not have been written in C but they could have been. A quick C
program with no window (and which does nothing) looks like this:

    void main(){}

Quote:

>Hello

>I have the opinion that every running program has a window,
>regardless of whether the programmer created a window or
>not.  I know that in VB even if I create an app without a form
>and specify unattended execution I still get a window with
>the exe name ( test.exe gives a window title of test).
>I've used that window handle and sent a WM_CLOSE to it
>that worked.
>Someone said that in C you can create apps without windows.  If so
>can anyone email me a .exe that runs without creating a window and
>handle.

>Can anyone shed any light on this.

>I know I'm more likely wrong than right but I would like some
>definitive facts.

>Best wishes, Murray



Fri, 09 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.
Hello  Gerald.

Ok.  I should have stated 'Are there any WINDOWS programs that do not
have a window?  Programs such as Attrib.exe are Dos Box programs.

The question is:  does the C program with  void main(){} compiled and
liked as a Windows application still generate a window handle at run
time? I dont' have a c compiler to do any testing.  A test C program
would need to be a little more complex so that it stays in memory for
awhile, so that an inspection using Spy can be made.  

Best wishes, Murray



Fri, 09 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.

Quote:

>Hello  Gerald.

>Ok.  I should have stated 'Are there any WINDOWS programs that do not
>have a window?  Programs such as Attrib.exe are Dos Box programs.

>The question is:  does the C program with  void main(){} compiled and
>liked as a Windows application still generate a window handle at run
>time? I dont' have a c compiler to do any testing.  A test C program
>would need to be a little more complex so that it stays in memory for
>awhile, so that an inspection using Spy can be made.

>Best wishes, Murray

A program using just void main() is a DOS program. It will need DOS to run.

A Windows program can survive without a window, but it needs a message loop
to stay running in the background. With no message loop, the only other way
to stop it from exiting is a normal code loop, which would just freeze the
system.

However, it is most common for a program to have a window, you just never
see it (it is hidden, or it stays iconized.

_ _
o o   Jason Teagle
 <

Please ONLY respond via e-mail if you want to catch my attention - I don't
necessarily look at the newsgroups all the time.



Sat, 10 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.
Hello Jason

Quote:
>A program using just void main() is a DOS program. It will need DOS to run.

Irrelevant. Not interested in Dos Apps. Depewnds on IDE settings
doesn't it?

Quote:
>A Windows program can survive without a window, but it needs a message loop
>to stay running in the background. With no message loop, the only other way
>to stop it from exiting is a normal code loop, which would just freeze the
>system.

Survive without a window?  meaning can survive without the programmer
spcifying a window.  I don't argue that you can write a program
without a window.  My theory is that when you run such a program an
invisible window will be created.  It is in VB5.

No message loop?  Just put a sleep statement in.  Then cancel thru
task menu. This could all be resolved in 10 minutes if someone wth a
C compiler would write a simple program and test it or better yet
email me the .exe.  Can you write a windowless C WINDOWS app
Jason?

Quote:
>However, it is most common for a program to have a window, you just never
>see it (it is hidden, or it stays iconized.

Did the programmer write the code for this window?

Best wishes, Murray



Sat, 10 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.

Quote:

>A Windows program can survive without a window, but it needs a message loop
>to stay running in the background. With no message loop, the only other way
>to stop it from exiting is a normal code loop, which would just freeze the
>system.

Yes and no. True, without a message loop there is no way to terminate the
program on an orderly fashion. But such a program would only lock-up a
16-bit windows system. 32-bit Windows uses preemptive multi-tasking so you
could kill the process using the task manager.


Sat, 10 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.

Quote:

>Hello  Gerald.

>Ok.  I should have stated 'Are there any WINDOWS programs that do not
>have a window?  Programs such as Attrib.exe are Dos Box programs.

>The question is:  does the C program with  void main(){} compiled and
>liked as a Windows application still generate a window handle at run
>time?

No, this would be a DOS app. It's been so long since I've done a Windows
program in C from the ground up...

I don't currently have C++ installed so I can't try this out, but looking at
the C++ MFC library class hierarchy chart. The CCmdTarget  class is the
first class capable of handling messages and does not seem to have any
window associated. CWnd class (derrived from CCmdTarget) has an m_hWind data
member which would indicate an associated window. Derriving a class from
CCmdTarget (or one of it's derrived classes like CWinThread or CWinApp )
might do what you want.

Please correct me if I'm off base here. At least I'm trying.

Gerald Gardner



Sat, 10 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.
Hello

Ok. I don't know if it should start with 'void main' but it would seem
to me to be easy to write a C (C++) program that does nothing but
execute a sleep api.  Compile and link it as a Windows App, Run it,
then use Microsoft's Spy to look for a window at run time.  This is
what needs to be done to resolve the issue.

Best wishes, Murray



Sat, 10 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.
Hello Jason

Thanks for the .exe.  Now I do have a definitive answer.

Indeed there is no generated window. I used Spy and found the
processid and threadId but there was no window.  This is in
contrast to a VB5 app where an (invisible) window is generated.

This is what I wanted to know.  My theory was wrong. Now I
can continue in peace.

Thanks again,  Murray



Sat, 10 Feb 2001 03:00:00 GMT  
 Yes, I have no windows.
I work with a product built around Excel, Word and Powerpoint.   We literally
distribute thousands of files every quarter that were developed with these
apps.

For now we still need to maintain backward compatibility with Office 95, so
all of our files must be saved in that (7.0) format.  I want to write a
utility that will check every file and verify that it was saved correctly.

I know I can open each Excel workbook and query activeworkbook.fileformat, but
what about Word and Powerpoint?

Also, it would be even better to test the files without having to open each
one.  Is this possible?

Thanks -- Rick



Tue, 27 Feb 2001 03:00:00 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. closing the Yes/No window when closing a Shelled Window

2. Flag resizeable=yes not working in window.open with IE4

3. Having minimum size for window...

4. Pass values to pop-up window....still having question

5. closing the Yes/No window after closing the Shelled window...

6. "Yes / Yes to All/ No / Cancel" MsgBox?

7. (EASY) HELP: Setting the value 'yes' to a Yes/No access data field

8. conversion of logical paid yes/no filed

9. Type of data of a yes/no field

10. Passing a yes/no response variable

11. Simple Yes/No question

 

 
Powered by phpBB® Forum Software