Windows 3.1 Shell Applications

Windows 3.1 Shell Applications

Post by Jonathan Dien » Sat, 03 Feb 1996 04:00:00



I have written a simple program launcher for W3.1 and would like to make
it act properly as the shell program (instead of program manager). I have
installed in WIN.INI as shell=myprog.exe.

It seems that program manager (and other shells) does some extra work on
closing. When I close my program, it simply closes normally without
shutting down any other apps that might be running. If I shut those down
manually, then windows shuts down, but not normally, as windows doesn't
play its closing sound WAV file. Program manager, on the other hand,
shuts down all other apps.

Program Manager also detects that it is running as the shell as the Exit
menu item changes to Exit Windows (or whatever), rather than plain Exit.

Does anyone know how to reliably detect that the app is running as the
windows shell, and what additional work must be done on receiving a
WM_CLOSE or WM_DESTROY message.

Thanks

--
-----------------------------------------------------------


For every problem there is a wise, original, ingenious, and totally wrong
solution.

 
 
 

Windows 3.1 Shell Applications

Post by Randy Charles Mor » Sun, 04 Feb 1996 04:00:00




Quote:>I have written a simple program launcher for W3.1 and would like to make
>it act properly as the shell program (instead of program manager). I have
>installed in WIN.INI as shell=myprog.exe.

>It seems that program manager (and other shells) does some extra work on
>closing. When I close my program, it simply closes normally without
>shutting down any other apps that might be running. If I shut those down
>manually, then windows shuts down, but not normally, as windows doesn't
>play its closing sound WAV file. Program manager, on the other hand,
>shuts down all other apps.

>Program Manager also detects that it is running as the shell as the Exit
>menu item changes to Exit Windows (or whatever), rather than plain Exit.

>Does anyone know how to reliably detect that the app is running as the
>windows shell, and what additional work must be done on receiving a
>WM_CLOSE or WM_DESTROY message.

>Thanks

I pasted this code from a program manager type application that I've wrote.
The important function is the ExitWindows.
Also important is the window messages that must be processed.
Why both?  I don't remember.

-------------------------------------------------------------
case WM_CLOSE:
case WM_QUERYENDSESSION:
        index = MessageBox(hwnd,
                        (LPCSTR)"End Windows session?",
                        (LPCSTR)"Exit Windows",
                        MB_YESNOCANCEL+MB_ICONINFORMATION);
        if (index!=IDCANCEL) DestroyWindow(hwnd);
        if (index==IDYES) ExitWindows(0,0);
        return 0;
-------------------------------------------------------------

Agrivar

 
 
 

1. Borland C++ 3.1 - Windows 3.1 Application memory problem

Hi,

        I  have used Borland C++ for developing a Windows Application. The
program has grown to a very large size and now I am having problems. I
use the large memory model. The situation now is that whenever I add a
character string or dialog box or any such things, it starts crashing
during execution. I f I remove whatever I had added it runs well. I
have to use 'malloc' for every char string I use. I guess this is a
memory problem. My question is how do I modify the '.def' file or
options to overcome this problem. If I increase the heap or stack size
by a small amount, it makes no difference. If I increase it by too
much, the data segment exceeds 64K. I don't know what's the problem,
but i am sure quite a few of you guys must know exactly what's going
on. Please reply as soon as possible.

Thankyou for paying attention,
Sunil

2. Make nonmodified dataset able to Insert...

3. Maximize DOS shell window in Windows 3.1

4. Intel SATISfaction 14.4 Fax modem ???'s

5. Windows 3.1 application failed in Windows for Work Group 3.11

6. Easy CD 95 PRO - first review

7. Printing problems with Windows 95 (with a Windows 3.1 application)

8. FACIT P8042 WIN - LASER PRINTER

9. Executing a Windows Application From DOS in Windows 3.1

10. Help: Windows 3.1 Application on Windows NT

11. Can't run windows application under 3.1, but could run on windows workgroups(3.11).

12. : Writing a Simple Windows 3.1 Shell

13. Windows 3.1 Internationalized application