Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Middle Mouse Wheel

    SDK Help
    0
    21
    11.7k
    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
      Helper
      last edited by

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

      On 31/07/2011 at 09:00, xxxxxxxx wrote:

      Okay.  I figured this out.  🙂  I wanted to share my results with others as it may come in handy for you as well.  🙂

      Here's the code I used to get it to work every time I click the second button.

        
      win->MouseDragStart(button,mx,my,MOUSEDRAGFLAGS_DONTHIDEMOUSE|MOUSEDRAGFLAGS_NOMOVE);  
        while (win->MouseDrag(&dx,&dy,&device)==MOUSEDRAGRESULT_CONTINUE)  
        {  
            if(dx == 0 && dy == 0)  
            {  
                GeSyncMessage(EVMSG_ASYNCEDITORMOVE);  
                BaseContainer bc = BaseContainer();  
                  
                win->BfGetInputEvent(BFM_INPUT_MOUSE, &bc);  
                if (bc.GetLong(BFM_INPUT_CHANNEL) == BFM_INPUT_MOUSERIGHT)  
                {  
                    GePrint("RIGHT BUTTON PRESSED");  
                }  
            }  
        }  
      

      I noticed that when I placed a GePrint() within the MouseDrag() loop that it would work perfectly. 
      This then led me to place this line:

        
      GeSyncMessage(EVMSG_ASYNCEDITORMOVE);  
      

      in to the code.  and with that little addition it works great..  This works also with the middle mouse wheel..    Just replace

      BFM_INPUT_MOUSERIGHT  
      with  
      BFM_INPUT_MOUSEWHEEL  
      

      Remember of course that this all works only if you are holding down the left mouse button.  🙂

      Hope this is helpful for someone.  🙂

      Thanks,

      Shawn

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