Article View: borland.public.cppbuilder.nativeapi
Article #15980Re: It's a mistery??? WM_SYSCOMMAND & Screen Savers
From: user
Date: Fri, 06 Jun 2003 01:56
Date: Fri, 06 Jun 2003 01:56
38 lines
2548 bytes
2548 bytes
Remy Lebeau (TeamB) wrote: > <user@domain.invalid> wrote in message > news:3EDEA93A.1090309@domain.invalid... > > >>Doesn't the Handled parameter only tell the VCL >>whether or not to process the message further? > > > Correct. > > >>Isn't the actual return value for the >>WM_SYSCOMMAND indicated in >>some member of the "tagMSG" struct? > > > No. MSG (tagMSG) is not the same as TMessage, which does have a Result > member. Messages processed by the OnMessage event handler can't return a > result value back for the message. Which is not a bad thing considering > that the OnMessage event is for processing messages posted to the main > message queue, which means they were posted with PostMessage() and thus > can't return any value anyway. If you're going to return a value for a > message, then the message has to be processed within the context of the > form's Dispatch() or WndProc() methods, which are called by the form's > underlying window procedure in response to messages sent via SendMessage(), > not PostMessage(). > > > Gambit > > All right, then, isn't that a likely reason why Mike Collins' code is not stopping the screen saver? The Windows docs say to return 0 from the WM_SYSCOMMAND message to indicate that it has been handled. I'm thinking that just not calling the default window proc is not enough. (Which is supported by the fact that it isn't working.)
Technical Details
Message-ID:
<3EDFF4DA.90707@domain.invalid>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ede7c1b@newsgroups.borland.com> <3EDEA93A.1090309@domain.invalid> <3edeb515$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,e18e111f10ac0959 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-05 19:04:11 PST Message-ID: <3EDFF4DA.90707@domain.invalid> Date: Thu, 05 Jun 2003 21:56:42 -0400 From: user@domain.invalid User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: It's a mistery??? WM_SYSCOMMAND & Screen Savers References: <3ede7c1b@newsgroups.borland.com> <3EDEA93A.1090309@domain.invalid> <3edeb515$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 68.162.138.29 X-Trace: newsgroups.borland.com 1054864628 68.162.138.29 (5 Jun 2003 18:57:08 -0700) Lines: 39 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail