wm_QueryEndSession

Hi,
a strange problem with the wm_QueryEndSession message (Delphi 4 /
Windows NT 4). Code:

...
private
procedure wmqueryendsession(var msg:twmqueryendsession); message
wm_queryendsession;
...
procedure tform1.wmqueryendsession(...);
begin
if messagebox(0,'continue shutdown?','',mb_yesno)=id_yes
then msg.result:=1 else msg.result:=0
end;
...

Start the app and try to shutdown NT. The messagebox comes up.
Reply 'No' and NT stays alive. So far so good. Don't close the app,
just do nothing and wait for the screensaver to start. Exit the saver
and - the entire desktop (apps, taskbar) is gone!!! Ctrl-Alt-Del stills
works and after closing the task manager the desktop is back again. Any
ideas / help / code?

Thomas

Sent via Deja.com http://www.deja.com/
Before you buy.