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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Changing The Cursor: Using Dialogs

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 332 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 26/02/2012 at 11:50, xxxxxxxx wrote:

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

      ---------
      Hey guys,

      I'm having a hard time finding how to change the cursor's appearance within C++ dialog plugins.
      I can get the LMB state and store the desired cursor appearance type into a BaseContainer just fine.
      And when I use the LMB it does print the correct ID# for that cursor type. But I can't make the cursor's appearance change.

      LONG myDialog::Message(const BaseContainer &msg, BaseContainer &result)  
      {  
        BaseContainer bc;                                                  //Used to hold the type of cursor to display  
        BaseContainer state;                                               //Used to hold the state of the LMB  
        while (GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSELEFT, state)) //While the LMB is held down   
        {  
         if(state.GetLong(BFM_INPUT_VALUE) == 0) break; //If the state value is 0. The LMB is no longer down..so exit the loop  
        
         LONG x = state.GetLong(BFM_INPUT_X); //Get the cursor's X screen coordinates  
         LONG y = state.GetLong(BFM_INPUT_Y); //Get the cursor's Y screen coordinates  
         //GePrint(LongToString(x));  
         //GePrint(LongToString(y));  
         
         bc.SetLong(RESULT_CURSOR,MOUSE_POINT_HAND);          //Store the cursor type into the container  
         GePrint(LongToString(bc.GetLong(RESULT_CURSOR)));    //Prints #19 when the LMB is pressed...Working good so far...  
         if (bc.GetId()==MOUSE_POINT_HAND) return TRUE;    //<---Wrong?  
        
        // ...do more stuff  
        }  
        
        return GeDialog::Message(msg,result);  
      }
      

      When using the GetCursorInfo() method. They just use SetLong(). And for some reason it works.
      But since I'm using a dialog plugin. I can't use GetCursorInfo(). And using SetLong() isn't working for me.
      What am I missing?

      -ScottA

      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 26/02/2012 at 16:57, xxxxxxxx wrote:

        Use GeShowMouse() to set the cursor type (from anywhere).

        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 26/02/2012 at 17:29, xxxxxxxx wrote:

          Thanks Robert. 🍺

          -ScottA

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