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

    BFM_INPUT_MOUSEWHEEL message

    SDK Help
    0
    11
    917
    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

      On 28/01/2016 at 04:47, xxxxxxxx wrote:

      Hi,

      in a GeDialog (same for your iCustomGui) this is roughly how expected it to work:

      You check the incoming message:
      msg.GetId() == BFM_INPUT

      You check the device:
      msg.GetInt32(BFM_INPUT_DEVICE) == BFM_INPUT_MOUSE

      And then check the channel:
      msg.GetInt32(BFM_INPUT_CHANNEL) == BFM_INPUT_MOUSEWHEEL

      Seems to work quite well here. If you continue to have this issue, can you please reveal a bit more of your message function?

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

        On 29/01/2016 at 07:54, xxxxxxxx wrote:

        Hi,
        and sorry for my delay...

        On "Command" method (from "class MyClass: public iCustomGui") I have:

        Bool MyClass::Command(LONG id, const BaseContainer &msg;)
        {
           switch (id){
              case IDC_COMBO_WPROP_TYPE:    
              {     
                //here is my combobox and over it I rotate the mouse wheel
                LONG lId = msg.GetId();
                if (lId == BFM_INPUT)
                int a = 5;   // something

        LONG chn = msg.GetLong( BFM_INPUT_CHANNEL );
             if (chn == BFM_INPUT_MOUSEWHEEL)
                int i = 9;   // something
              }
              break;
              ...
           }
           
           return iCustomGui::Command(id, msg);
        }

        Here "lId" is 0x62414354 = "bACT" which means "BFM_ACTION" not "BFM_INPUT"

        Can I see on "Command()" if the mouse wheel is rotated?

        Thank you,
        Daniel

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

          On 29/01/2016 at 08:50, xxxxxxxx wrote:

          and chn is 0

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

            On 30/01/2016 at 07:46, xxxxxxxx wrote:

            I could be wrong about this.
            But if you're trying to test for the rotating mouse wheel while hovering over a gizmo on a GeDialog. I don't believe that's possible.
            I think the gizmo's ability to catch mouse wheel values is private. And not supported in the SDK.

            The only places I know where we can catch the rotation values of the mouse wheel are:
            -The Editor view
            -A User Area attached to a GeDialog

            Detecting it anywhere else would require coding directly to your OS.
            But I could be wrong.

            -ScottA

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

              On 01/02/2016 at 00:43, xxxxxxxx wrote:

              Thank you Scott for your info

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

                On 01/02/2016 at 01:15, xxxxxxxx wrote:

                Hi,
                In Attributes window I have some comboboxes like in the below attached picture (inherited from iCustomGui) and I want to inhibit the changing of values when I rotate the wheel of mouse over combobox.

                Daniel

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

                  On 01/02/2016 at 02:04, xxxxxxxx wrote:

                  Hi,

                  I'm really not sure what the issue is. I mean, as you wrote, you already get the BFM_ACTION in your Command() function, when using the mousewheel on the combobox.
                  I tried it here, in a GeDialog and it works just as expected.
                  In your code example, you are of course evaluating things, that are not there. You are checking for BFM_INPUT and regardless of the result you try to evaluate the channel.
                  Instead, you should evaluate, what you have received, as you said BFM_ACTION.
                  And in my tests here, if the message ID is BFM_ACTION, I can simply read the BFM_ACTION_VALUE to get the new value of the combobox.

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

                    On 01/02/2016 at 04:40, xxxxxxxx wrote:

                    Hi Andreas,
                    Yes, you are right that I didn't evaluate correctly the result of BFM_INPUT... I did only some tests...

                    My combobox is added in "CreateLayout()" with "AddComboBox" (which is from GeDialog)

                    Bool iWidgetPropertyGui::CreateLayout( )
                    {
                    ...
                    AddComboBox(IDC_COMBO_WPROP_TYPE,BFV_TOP|BFH_LEFT,SizePixChr(80,10),SizePixChr(10,1));
                    ...
                    }

                    Is it possible to have this behaviour because I use Cinema4D R13 variant?

                    Thank you,
                    Daniel

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

                      On 01/02/2016 at 04:57, xxxxxxxx wrote:

                      Well, usually we don't support versions older versions than the current one.
                      But I don't see a reason, why it shouldn't work in R13. Haven't tried it though.

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

                        On 01/02/2016 at 05:19, xxxxxxxx wrote:

                        To be more explicit this is my window and in green area I can catch "BFM_INPUT_MOUSEWHEEL" and "BFM_INPUT" messages.

                        I understand that the combobox consumes this message and it is not forwarded...

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