LONG Cycle (combobox)

On 29/10/2015 at 06:47, xxxxxxxx wrote:

User Information:
Cinema 4D Version:    
Language(s) :

Hello, i wondering why my Long cycle never change value ever i click on on it. And how did you get the value of it inside your code ?

BOOL & cie i do this  tag->GetData()->GetBool(NAME_OF_MY_BOOL_IN_H_FILE); inside my execute code ? (i'm working on a tag plugin)

but i didn't found the solution for LONG ...

Maybe with messages ? Or maybe i should use GetDParameter() and SetDParameter().

Thanks for any help

On 30/10/2015 at 07:24, xxxxxxxx wrote:


it's hard to tell, why the combobox doesn't react on user interaction without seeing any of your code and how you set it up. One reason I could imagine, if there's only one value assigned to the combobox, so there's nothing to choose from.
In order to get/set values to the combobox, you simply use GetInt32()/SetInt32(). The reason, why it's still called LONG in resource files has historic reasons. With Cinema 4D R15 a more clear and precise naming of datatypes took place, since then the API functions Get-/SetLong() are called Get-/SetInt32().

While this actually has nothing to do with Cinema 4D, one reason for this change is, that the C-types long and int are not really defined in their width (number of bits). On 32-Bit systems this was still easy and everybody seemed to have agreed, that they are 32-Bit wide (at least on x86 with Windows, OS X and Linux). But with the introduction of 64-Bit wide x86 processors, the developers of the various operating systems (and compilers) did choose different roads and the width of int and long types was suddenly different. I guess, one could blame Kernighan and Ritchie for this inconsistency...

On 02/11/2015 at 04:41, xxxxxxxx wrote:

Hi andreas,

You're very helped me on this, If you do that for everyones you shouldn't sleep a lot ^^

I found my error. I didn't provide values In my .h file because i said to myself : I not useful, it is the LONG who send me back value not the ELEMENT inside... Bad move !

It work like this for .res file :


In .h file :

ACTION_NAME          = 1103,  
  FIRST                    = 1104,  
  SECOND               = 1105,  

And in .str table file :

ACTION_NAME            "How is the woman ?";  
  FIRST                      "dressed";  
  SECOND                  "naked";