Link to home
Start Free TrialLog in
Avatar of leowlf
leowlf

asked on

CRectTracker movement

How do i restrict the rectangle of a CRectTrack to move in horizontal direction only when the user LButtonDown on the rectangle and drags it  around?

I have managed to set the rectangle to 'Track' the mouse on LButton down.  What should i do after that?


 
Avatar of Bridge
Bridge

In the OnLButtonDown handler store the current vertical offset. Override the OnMouseMove message handler and change the value back to this stored offset before passing it through to the base class implimentation.
ASKER CERTIFIED SOLUTION
Avatar of olgat
olgat

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