Program that won't close
#6
I don't understand the problem. First of all, %WM_SYSCOMMAND and %SC_CLOSE is only reached when you close a program via the system menu close or X in caption bar. There is nothing you can do at that point other than preventing close by returning 1 and exit in dialogs, or exit function in SDK message loop.

Usually better to move closing stuff, stopping ticking timers and saving settings, etc. to %WM_DESTROY, which is reached regardless of how a program is ended. Also, when a parent dialog is closed, all child dialogs and controls are destroyed with it. No need for any extra dialog ends for child dialogs.

Is it the external PAY.EXE that is the problem and if so - is that your own program? A tip is to use MS Spy to monitor messages in a program. It can tell what is happening at the end - what is missing, etc.
Reply


Messages In This Thread
RE: Program that won't close - by Mike Doty - Yesterday, 15:48
RE: Program that won't close - by Borje Hagsten - Yesterday, 18:07

Forum Jump:


Users browsing this thread: Dave Biggs, 1 Guest(s)