Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Mouse Wheel Direction

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 231 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 05/09/2011 at 19:18, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:   Windows  ; Mac  ;  
      Language(s) :     C++  ;

      ---------
      Is there a way to capture the direction that the mouse wheel is turning and how much it has turned?

      Thanks,

      I can capture if the mouse wheel is turning by doing this...

        
        
      //Check for right clicks and middle wheel clicks  
        win->MouseDragStart(button,mx,my,MOUSEDRAGFLAGS_DONTHIDEMOUSE|MOUSEDRAGFLAGS_NOMOVE);  
        while (win->MouseDrag(&dx,&dy,&device)==MOUSEDRAGRESULT_CONTINUE)  
        {  
              
                GeSyncMessage(EVMSG_ASYNCEDITORMOVE);  
                BaseContainer bc = BaseContainer();  
                  
                win->BfGetInputEvent(BFM_INPUT_MOUSE, &bc);  
                if (bc.GetLong(BFM_INPUT_CHANNEL) == BFM_INPUT_MOUSEWHEEL)  
                {  
                    GePrint("MOUSE WHEEL SPINNING");  
                }  
        
        }  
        
        
      

      I am unsure how to determine which direction the mouse is spinning and how much it has spun.  🙂

      Any help would be greatly appreciated.

      Shawn

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/09/2011 at 02:48, xxxxxxxx wrote:

        Some code direct from the liquidtool.cpp example  😉

          
        bc=BaseContainer();  
        win->BfGetInputEvent(BFM_INPUT_MOUSE,&bc);  
        if (bc.GetLong(BFM_INPUT_CHANNEL)==BFM_INPUT_MOUSEWHEEL)  
        {  
          rad+=bc.GetReal(BFM_INPUT_VALUE)/120.0;  
          rad=FCut(rad,RCO 0.1,RCO MAXRANGE);  
          GePrint(RealToString(rad));  
        }  
        

        cheers,
        Matthias

        1 Reply Last reply Reply Quote 0
        • First post
          Last post