Board index » delphi » Detecting where the mouse has entered or leaved a window control (not form control)

Detecting where the mouse has entered or leaved a window control (not form control)

I would like to know how to detect when the mouse has entered or leaved a
window control of the Window's desktop.

 

Re:Detecting where the mouse has entered or leaved a window control (not form control)


Quote
Kimberly N. wrote:

> I would like to know how to detect when the mouse has entered or leaved a
> window control of the Window's desktop.

Well, A good place to start is by responding to WM_MouseEnter and
WM_MouseLeave.  These are detailed in Ray Lischner's book "Secrets of
Delphi 2"  but the code is still good for Delphi 3.

Derek

Re:Detecting where the mouse has entered or leaved a window control (not form control)


 Actaully, the 'VCL way' to do this is respond to the CM_MOUSEENTER and
CM_MOUSELEAVE messages.

Cheers,
Paul

Quote
>Well, A good place to start is by responding to WM_MouseEnter and
>WM_MouseLeave.  These are detailed in Ray Lischner's book "Secrets of
>Delphi 2"  but the code is still good for Delphi 3.

>Derek

Re:Detecting where the mouse has entered or leaved a window control (not form control)


Quote
Paul Hazlett wrote:

>  Actaully, the 'VCL way' to do this is respond to the CM_MOUSEENTER and
> CM_MOUSELEAVE messages.

> Cheers,
> Paul

> >Well, A good place to start is by responding to WM_MouseEnter and
> >WM_MouseLeave.  

You're right!  That's what I get for trying to remember them from *my*
memory after not using them in 8 months! :(

Mea culpa, mea maxima culpa!  I'll remember to *re*-read the text before
quoting it next time.

Derek

Other Threads