THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/09/2011 at 12:44, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
Can anyone tell me how to add icon images to gizmos when you are using an external .res file.
The SDK has an example of how to do it with the Add method like this:
Bool myDialog::CreateLayout(void)
{
Bool result = TRUE;
GeResource dlg_res;
dlg_res.Init(GeGetPluginPath());
result = LoadDialogResource(IDS_RESDIALOG, &dlg_res, 0); //IDS_RESDIALOG is the items found in the .res file
//This combobutton we'll add here in the .cpp file... And not from the external .res file
GroupBegin(0,BFH_LEFT,2,0,"",0);
{
AddComboBox(MY_COMBOBUTTON2, BFH_SCALEFIT);
IconData dat1,dat2,dat3,dat4; //Create a few new IconData type variables to hold our icons
GetIcon(Ocube,&dat1);
GetIcon(Osphere,&dat2);
GetIcon(Ocylinder,&dat3); //Assign some icons to the variables we created above
GetIcon(Ttexture,&dat4); //IconID's can be found in the file CINEMA 4D R12/resource/libs/interface_icons.txt
AddChild(MY_COMBOBUTTON2, 0, GeLoadString(IDS_CUBE)+"&i"+LongToString(Ocube)+"&"); //IDS_CUBE is declared in the c4d_symbols.h file.& the text is in c4d_strings.str
AddChild(MY_COMBOBUTTON2, 1, GeLoadString(IDS_PHONG)+"&i"+LongToString(Tphong)+"&");
AddChild(MY_COMBOBUTTON2, 2, GeLoadString(IDS_SPHERE)+"&"+PtrToString(&dat2)+"&"); //Uses a pointer to find the icon image instead of using the above method
}
GroupEnd();
return TRUE;
}
But I can't find any information how to do the same thing using a .res file.
-ScottA