On 27/01/2016 at 08:29, xxxxxxxx wrote:
Cinema 4D Version: R13
Platform: Windows ;
Language(s) : C++ ;
In Attribute window, when I rotate mouse wheel (over a combobox control) the value is changing and I want to inhib this operation.
On Message(const BaseContainer& msg, BaseContainer& result) method (inherited from iCustomGui),
if I rotate mouse wheel
LONG ch = msg.GetLong( BFM_INPUT_CHANNEL );
the result is ch = 0;
My expectaction was ch = 100 (which means "BFM_INPUT_MOUSEWHEEL")
If I click on mouse wheel the result is ch = 3 (which means "BFM_INPUT_MOUSEMIDDLE")
Can you help me please, why the result is 0 when I rotate the wheel?
Or do you have an other ideea how to do?
On 28/01/2016 at 04:47, xxxxxxxx wrote:
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?
On 29/01/2016 at 07:54, xxxxxxxx wrote:
and sorry for my delay...
On "Command" method (from "class MyClass: public iCustomGui") I have:
Bool MyClass::Command(LONG id, const BaseContainer &msg;)
//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
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?
On 29/01/2016 at 08:50, xxxxxxxx wrote:
and chn is 0
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.
On 01/02/2016 at 00:43, xxxxxxxx wrote:
Thank you Scott for your info
On 01/02/2016 at 01:15, xxxxxxxx wrote:
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.
On 01/02/2016 at 02:04, xxxxxxxx wrote:
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.
On 01/02/2016 at 04:40, xxxxxxxx wrote:
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( )
Is it possible to have this behaviour because I use Cinema4D R13 variant?
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.
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...