🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to catch mouseclicks from another application?

#10443
From: Remy Lebeau (TeamB)
Date: Thu, 08 Apr 2004 17:12
21 lines
1614 bytes
"Henk" <h.van.winkoop@wxs.nl> wrote in message
news:40754399$1@newsgroups.borland.com...

> //My mouseproc definition
> LRESULT CALLBACK MouseProc(int nCode,WPARAM wParam,LPARAM lParam)

You need to export the callback so that the OS can find it when attaching
the DLL to other processes.

> I keep getting this compile error: Type mismatch in parameter 'lpfn'
>     Cannot convert 'long(__stdcall*)(int,unsigned int,long)' to
> 'int(__stdcall*)()'

You need to cast thefunction pointer:

HHOOK MyHook = SetWindowsHookEx(WH_MOUSE, (HOOKPROC)MouseProc, MyInstance,
MyThreadId);


Gambit
Technical Details
Message-ID: <40758801$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <407421ef@newsgroups.borland.com> <40743aad$1@newsgroups.borland.com> <40754399$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e0858ea1c0821ca
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-08 10:40:06 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <407421ef@newsgroups.borland.com> <40743aad$1@newsgroups.borland.com> <40754399$1@newsgroups.borland.com>
Subject: Re: How to catch mouseclicks from another application?
Date: Thu, 8 Apr 2004 10:12:42 -0700
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <40758801$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1081444353 67.22.138.253 (8 Apr 2004 10:12:33 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail