-
December 29th, 2000, 08:58 PM
#1
Service and/or "no-show" window in Windows 95
My understanding is that Windows 95 does not support services. If it is possible to have a service
run, how is this done?
If it is not possible/simple to have a service run, I want a program that does not show a window when
it executes. I attempt to achieve this with ShowWindow. However, using this does not seem to stop
a window from appearing briefly on the screen. Is there a way to keey the program from appearing at
all?
Here are your options, joex
-
December 29th, 2000, 09:50 PM
#2
Re: Service and/or "no-show" window in Windows 95
Here you can read about services in Windows 95/98:
http://msdn.microsoft.com/library/ps...95scm_5cmq.htm
You can create an application without any windows at all, or
you can create an application with invisible windows. To
create invisible window just make sure that WS_VISIBLE style
is not specified at window creation. ShowWindow should also
work.
-
December 29th, 2000, 10:48 PM
#3
Re: Service and/or "no-show" window in Windows 95
The window still briefly appears even when WS_VISIBLE is removed from the dialog in the rc file.
How can a project be created without any windows - I don't mean a console application, because a DOS window also appears for a moment.
-
December 30th, 2000, 01:01 AM
#4
Re: Service and/or "no-show" window in Windows 95
You didn't mention in the original post that the window is
a dialog window. Now I understand your problem, since I had
the same.
Modal dialog is shown regardless of WS_VISIBLE style in the
dialog template. Moreover, calling ShowWindow(SW_HIDE) in
WM_INITDIALOG handler also won't help, because the system
shows dialog some later (and I don't know exactly when it
happens -- I tried to track it without success).
I resolved it by creating modeless dialog. It will be hidden
if WS_VISIBLE flag is not specified in the dialog template.
If you want to create a project without any windows just do
your job inside WinMain function. Or, if you are using MFC,
do it inside InitInstance and return FALSE.
-
December 30th, 2000, 07:44 AM
#5
Re: Service and/or "no-show" window in Windows 95
If no dialog is created, then putting either:
return FALSE;
return TRUE;
in InitInstance - results in the program exiting. Does there have to be a modeless dialog for this to work?
-
December 30th, 2000, 01:10 PM
#6
Re: Service and/or "no-show" window in Windows 95
I mean you should do all your work inside InitInstance and
exit from this function only when entire program has to exit.
-
December 31st, 2000, 06:43 AM
#7
Re: Service and/or "no-show" window in Windows 95
Thanks.
BTW, to make a modal dialog invisible, do the following:
in DefWindowProc, put:
if (message == WM_NCPAINT)
{
ShowWindow(SW_HIDE);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|