Link to home
Start Free TrialLog in
Avatar of electrick
electrick

asked on

mousemove event

How do I get a CButton object to activate OnMouseMove(UINT nFlags, CPoint point) ?
OnMouseMove is only triggered while moving over the dialog object.  I want to know when the mouse is over a button or other control.
Avatar of chensu
chensu
Flag of Canada image

Derive your own class from CButton and override OnMouseMove. Assoicate the button with your derived class.
Avatar of electrick
electrick

ASKER

How?
I understand the reasoning, I just don't know how to do it. I've increased points to 100...please explain

Thanks
ASKER CERTIFIED SOLUTION
Avatar of kishk91
kishk91

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi electrick,

By the time i got the code ready kishk91 had answered it. Any way if you need to complete source code you can mail me at abdij_b@hotmail.com
Thanks, that's what I needed.  It seems to work fine.
That worked fine, now how do I get a pointer back to the Dialog Class to use it's member variables?
Hi,

Through the GetParent()function in the derived button class.

Bye.