Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 14261
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: Wed Jun 18 13:03:20 CEST 2025

Total time taken to generate the page: 0.05572 seconds