IupSetHandle
Associates a name with an interface element.
Parameters/Return
Ihandle *IupSetHandle(const char *name, Ihandle *ih);
name: name of the interface element.
ih: identifier of the interface element. Use NULL to
remove the association.
Returns: the identifier of the interface element previously associated to the parameter name.
Notes
This function allows setting attribute values that are in fact other elements created in C. For example:
IupSetHandle("test_image", image);
IupSetAttribute(button, "IMAGE", "test_image");
This code can be replaced by a single function call:
IupSetAttributeHandle(button, "IMAGE", image);
Any pointer can be stored and retrieved with IupSetHandle and IupGetHandle, not only Ihandle*.
IupSetHandle can be called several times with the same pointer and different names. There is no restriction for the number of names a pointer can have, but IupGetName will return only the last name set.
When IupSetHandle is called, the control will have a HANDLENAME attribute with the last name set.