🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Get global Windows messages

#13899
From: Eugene Mayevski
Date: Mon, 15 Sep 2003 20:08
21 lines
2026 bytes
ferrizzi wrote:

> Hi, I'm working on an application where the form is ever hidden, the form
> must appear only after the left mouse button is down for more than one or
> two seconds with the cursor still. I this way the cursor is not on my active
> form and the APIs don't work (GetMessage etc). Is there a function to that
> allows  my application to listen the WM_LBUTTONDOWN message everywhere in
> the system?

You need to set system-wide hook on mouse. See SetWindowsHookEx API 
function in MSDN.
BTW you need to remember the coordinates, cause some mouse drivers seem 
to send WM_MOUSEMOVE despite the mouse has not moved (maybe this is 
because of optical mice which are very sensitive or something else, I 
don't know, but this is fact).

-- 
Eugene Mayevski
EldoS Corp., CTO
Networking and security solutions, custom development services
http://www.eldos.com
Technical Details
Message-ID: <3f661c79@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f6617e7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,63745d05484b53f
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-15 13:11:51 PST
Date: Mon, 15 Sep 2003 23:08:10 +0300
From: Eugene Mayevski <mayevski@eldos.org>
Reply-To:  mayevski@eldos.org
Organization: EldoS Corporation
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, uk, en, ru
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Get global Windows messages
References: <3f6617e7@newsgroups.borland.com>
In-Reply-To: <3f6617e7@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.9.249.225
Message-ID: <3f661c79@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063656569 212.9.249.225 (15 Sep 2003 13:09:29 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail