🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Looking for an example of mouse- or keyboard-hooks for BCB5

#15422
From: Eugene Mayevski
Date: Sat, 05 Jul 2003 14:24
24 lines
2161 bytes
M_R wrote:

> Having tried for my own,  having looked through the net, having tried
> to translate a delphi-example into C++, all without final success,
> perhaps someone knows/has an working BCB(5) example for using mouse-
> or (keyboard-) hooks.

See ActivityMon on EldoS site (http://www.eldos.org/). It's source 
contains project files for VC but you will be able to rework it quite 
easily for BCB.

> Best would be, if, e.g. a lmb-mouse-click has happened, the dll which
> does handle it would be able to call a function inside the
> main-program which initiated this mouse-hook, i.e. some kind of a
> callback.

This is not possible cause the hook works in address space and in 
process context of any UI application. You need to use some interprocess 
communication for sending a message to main program

-- 
Eugene Mayevski
Flexible cross-platform information exchange framework
http://www.msgconnect.com/
Technical Details
Message-ID: <3f06e04b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <0oidgvgc9issuibu3369ebkd7u3h6hfh9d@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c8028aaaabe6faee
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-05 07:29:03 PST
Date: Sat, 05 Jul 2003 17:24:33 +0300
From: Eugene Mayevski <mayevski@eldos.org>
Reply-To:  mayevski@eldos.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312
X-Accept-Language: en-us, uk, en, ru
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Looking for an example of mouse- or keyboard-hooks for BCB5
References: <0oidgvgc9issuibu3369ebkd7u3h6hfh9d@4ax.com>
In-Reply-To: <0oidgvgc9issuibu3369ebkd7u3h6hfh9d@4ax.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.9.249.194
Message-ID: <3f06e04b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1057415243 212.9.249.194 (5 Jul 2003 07:27:23 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail