🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7228

Re: Running app on another desktop

#7228
From: Remy Lebeau (TeamB)
Date: Mon, 07 Mar 2005 06:24
14 lines
1500 bytes
"Daniel" <d.jimenez@comvision.net.au> wrote in message
news:opsm8qztq7oyenhq@development-ws2.comvision.intranet...

> In this launched application, I am trying to capture WM_QUERYENDSESSION
> and WM_ENDSESSION via WndProc() to prevent the user from logging off.
> The code works perfectly when running under the default desktop but the
> messages are never received when running under the newly created desktop.

Try having the spawned process call  SetConsoleCtrlHandler() to receive
CTRL_LOGOFF_EVENT and CTRL_SHUTDOWN_EVENT notifications.


Gambit
Technical Details
Message-ID: <422bf3a4$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <opsm8p981moyenhq@development-ws2.comvision.intranet> <opsm8qztq7oyenhq@development-ws2.comvision.intranet>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a1b849e29d6cf9bc
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <opsm8p981moyenhq@development-ws2.comvision.intranet> <opsm8qztq7oyenhq@development-ws2.comvision.intranet>
Subject: Re: Running app on another desktop
Date: Sun, 6 Mar 2005 22:24:58 -0800
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <422bf3a4$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110176676 68.69.17.41 (6 Mar 2005 22:24:36 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail