Object library ObjcFree() ObjcStrCpy()
Programming guideline of WinDom

ObjcString()

NAME

ObjcString - get and set the label of an object.

PROTOTYPAGE

char *ObjcString( OBJECT *tree, int index, char *newstr);

PARAMETERS

tree:
address of object tree,

index:
object index,

newstr:
new label or NULL,

return:
address of the object label.

DESCRIPTION

ObjcString() provides an universal acces of the label (text) of any object. The object can be a button, a string, an icon. If the object has not text, the function does nothing. If a NULL value is given to newstr parameter, ObjcString() returns the address of the object text. The text returned can be read or modified:

     		printf( "Object i : %s\n", ObjcString( tree, i, NULL), i);
     		strcpy( ObjcString( tree, i, NULL), "New text");
It is possible to define a new buffer for the object:

     		char txt[120] = "New text";
     		ObjcString( tree, i, txt);
ObjcString() should never be used to change the text of an menu item. For that purpose, use MenuText() instead of ObjcString().

SEE ALSO

MenuText()