Except that it's not what is happening. I put a break point on all the calls to SetFocus and none of them were called.

Phil.

Phil Middlemiss wrote:
Good guess. That's exactly what has happened. Our component is still getting the mouse move message so I'll see if I can fix this problem by sending WM_KILLFOCUS to the TVirtualTree (which it seems it responds to).

Conor Boyd wrote:
I suspect the other component is calling the Win API method SetCapture,
which according to the API help:

"The SetCapture function sets the mouse capture to the specified window
belonging to the current thread. Once a window has captured the mouse,
all mouse input is directed to that window, regardless of whether the
cursor is within the borders of that window. Only one window at a time
can capture the mouse. "

Not sure what you do about it, but maybe that info is of some use.

HTH,

Conor

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Phil Middlemiss

We have a component that can use the mouse wheel - unfortunately, we
also use another component (not ours) that uses the mouse wheel. The
standard windows convention seems to be that whatever window has the
focus gets to process the message first. So even though the mouse is
over our component when the mouse wheel is rolled, the other component
gets the message.

I seem to remember some time ago seeing how to replace the main
TApplication message handler with your own, but can't remember how now. Is this possible? What is the technique?

_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi



_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
begin:vcard
fn:Phil Middlemiss
n:Middlemiss;Phil
org:Vision Software, MTS Ltd
email;internet:[EMAIL PROTECTED]
title:Project Leader
tel;work:+64 7 3480001
tel;cell:+64 27 4592648
x-mozilla-html:TRUE
url:http://www.tumonz.co.nz
version:2.1
end:vcard

_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to