Hi again all.
Well this problem is starting to anoy me !
I am doing the following :-

procedure TfrmMain.WMQueryEndSession(var Msg: TWMQUERYENDSESSION);
const
  ABORT_WINDOWS_SHUTDOWN = 0 ;
  CONTINUE_WINDOWS_SHUTDOWN = 1 ;
begin
  inherited;
  Msg.Result:=CONTINUE_WINDOWS_SHUTDOWN;
end;

Which from all I have read, is all I need to do.
This code IS called, as I have put a showmessage in there to see, and
when I tell windows to shut down it will show me the message, but that's
it !
It just wont do anything else.
As you can see I am doing nothing in there other than saying, yes
continue to close down.
I then had a showmessage in the OnClose event, but that never gets
shown, and windows stops closing down.

I just don't get it. WHAT am I doing wrong? WHY wont windows continue to
shut down?
Have I misses a step?

Thanks, Jeremy

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Alistair George
Sent: Wednesday, 12 November 2003 11:50
To: Multiple recipients of list delphi
Subject: Re: [DUG]: application shutdown


Hello Jeremy,
JC> slightly different to Al's problem in that when windows trys to shut

JC> my app, only the OnCloseQuery is fired EVEN if I set CanClose:=true;
OCQuery is called regardless if you call close.

What you are probably dealing with here J is 'Attempt to free unexisting
resource'

Get enough of those and it would seem IMHO that the app will not close
happily, and even if you force it, Windows shutdown proceedure is
interrupted.

You would have Memproof in your collection? Try running that and seeing
what you can find that needs fixing. Get it running clean and that could
make the difference.

MyApp has a menuitem which it is attempting to free which is hidden
somewhere.
Al+

------------------------------------------------------------------------
---
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to