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

ObjcDup()

NAME

ObjcDup - objects duplication.

PROTOTYPAGE

OBJECT *ObjcDup( OBJECT *tree, WINDOW *win);

PARAMETERS

tree:
address of object tree to duplicate,

win:
window descriptor if form is hosted in a window,

return:
address object tree duplicated.

DESCRIPTION

ObjcDup() performs a dynamic copy of an object tree. The new object tree created is different but have the same properties. Currently, string, image, icon and editable field are not duplicated but it should do (project). An object tree created with ObjcDup() should be free by ObjcFree().

If object tree contains USERDRAW object, the parameter win is absolutely required. In other case, NULL is a correct value;

This function is used by FormCreate() to open several formular with the same object tree. If the WS_FORMDUP bit of the status window descriptor field is set to 1, the standard destruction function release the memory with ObjcFree().

FormAttach() does not duplicated the object tree. If you create multiple window formular from an unique object tree with FormAttach() you should duplicate the object tree with ObjcDup().

Toolbars and menus attached to a window with WindSet() are duplicated in memory using ObjcDup() and the memory automatically released when the window is destroyed.

SEE ALSO

ObjcFree(), FormCreate().