home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Significant Series Windows
/
PCSIG-SignificantSeriesWindows-Win31.iso
/
0winrun
/
3427
/
exit.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-08
|
2KB
|
46 lines
#include <windows.h>
/*
EXIT
This program is intended for use with Dropper, a desktop manager.
You can leave it on the desktop, ready for activation. It allows
you a quick exit from Windows without needing to run a utility like
WinExit, which has to be running in order to react to your
double click, and thus uses up Windows resources.
As you can see, it's not the most elaborate program in the world.
*/
int PASCAL WinMain(HANDLE hInstance,
HANDLE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
{
/***********************************************************************/
/* HANDLE hInstance; handle for this instance */
/* HANDLE hPrevInstance; handle for possible previous instances */
/* LPSTR lpszCmdLine; long pointer to exec command line */
/* int nCmdShow; Show code for main window display */
Note: When launched normally EXIT will display the Message Box. If
launched as an icon, say, it will call ExitWindows immediately. To
use this feature in Dropper, set the Run Minimized checkbox for the
dropped icon.
/***********************************************************************/
if (!hPrevInstance) {
if ( (nCmdShow != SW_SHOWNORMAL)
||
(IDOK == MessageBox(NULL,
"Exit Windows Now ?",
"Windows Exit",
MB_ICONQUESTION | MB_OKCANCEL))
)
ExitWindows(0,0);
}
} /* End of WinMain */