TIP: Click on subject to list as thread! ANSI
echo: win32
to: ALL
from: Eugene Mayevski
date: 1999-07-16 00:00:00
subject: Re: Win32 C/C++ sub-classing project.

From: Eugene Mayevski 
Subject: Re: Win32 C/C++ sub-classing project.
Date: 1999/07/16
Message-ID: #1/1
Content-Transfer-Encoding: 7bit
References: 
Content-Type: text/plain; charset=koi8-r
Organization: JSC "Intergas"
Mime-Version: 1.0
NNTP-Posting-Date: 16 Jul 1999 13:25:12 GMT
Newsgroups: fido.win32,microsoft.public.win32.programmer.messaging,microsoft.public.win32.programmer.tools,microsoft.public.win32.programmer.ui

Patrick wrote:

> In order to do implement the drag without interference by the application,
> it appears we need a sub-class *or* windows hook to get the mouse messages
> WM_LBUTTONDOWN & WM_MOUSEMOVE BEFORE the application window receives them.

If you're sure, that your program is started AFTER the app being hooked, and will be
finished BEFORE the app being hooked, then the solution is to embed your DLL into the
app's process context, and let it subclass the window. That's easy to do. Regular hooking
also may be easy, but there may appear some problems (if some other program also reacts on
the WM_LBUTTONDOWN & WM_MOUSEMOVE messages, there will be no way to forbide it to do it). 

> Also, in case it is relevant, let me state that our C/C++ program will
> actually be called from this stated application window, therefore running in
> the same thread??

Never. It runs in it's own context (don't matter, who started it). 

> --
> Patrick
> E-mail : empirec@nospam.gate.net

-- 
Eugene Mayevski,
Certified Master Delphi Programmer (e-Certificate by TekMetrics)
http://eldos.hypermart.net - the source of original freeware
E-Mail: mailto:Eugene-Mayevski@usa.net
ICQ#: 9409786

SOURCE: echoes via archive.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.