U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Grabbing mouse events
Re: Grabbing mouse events [message #7880 is a reply to message #7876] Sun, 28 January 2007 19:12 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Next time please post the while package zipped so that we can test the solution.... ("a testcase"...)

I think this should help:

    virtual void LeftDown(Point p, dword keyflags) {
        SetCapture();
    	pprev = p;
    }	
    
    virtual void MouseMove(Point p, dword keyflags) {
       if(IsCapture()) {
           int dx=p.x-pprev.x;
           int dy=p.y-pprev.y;    
           x_angle_deg += dx;
           y_angle_deg += dy;       
           pprev = p;
           this->Refresh();
       }
    }


(LeftUp and bool mousedown are not necessary here)

Mirek

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to find the top-most window the mouse is over (Linux)?
Next Topic: Set or paint with transparent color?
Goto Forum:
  


Current Time: Fri May 15 19:19:45 GMT+2 2026

Total time taken to generate the page: 0.00496 seconds