THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/05/2012 at 21:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;
---------
Hi folks,
how do I get a button message happening for a button that's created in a dynamically added group?
For instance, if a user has added two groups, how do I target the button press coming from the second group?
//############################################################
//-- Dynamic Group Button
//############################################################
DescriptionCommand *dc_Group_Button = (DescriptionCommand* )data;
LONG Button_Group_Button = dc_Group_Button->id[0].id;
switch (Button_Group_Button)
{
case ID_TAB_GROUP_BUTTON: // I can add +1 here, but this then only actions the ID_TAB_GROUP_BUTTON+1 ID button...
{
GePrint("nth button pressed...");
break;
}
}
I'm just not sure how to implement the 'nth' button number into the Message() command... I tried experimenting with ID_TAB_GROUP_BUTTON+i (and manually set i=2 just for testing purposes) but it then wouldn't compile because it didn't like the +i being there. Any ideas?
WP