![]() | Programming Guide | WideStudio/MWT Index Table of contents |
How to create/delete the instances
How to create the instance
You can create the instance with the method: WSCbase::getNewInstance().char* class_name = "WSCvlabel"; char* obj_name = "vlabel001"; WSCbase* parent //The parent instance which has new instance. //create a new instance. WSCbase* object = WSCbase::getNewInstance(class_name,parent,obj_name); object->initialize(); //initialize the instance. object->clear(); object->setProperty(WSNx,100); object->setProperty(WSNy,100); object->setProperty(WSNwidth,100); object->setProperty(WSNheight,100); object->setVisible(True);You have to call initialize() to initialize before calling the other methods of the created instance.How to delete the instance
You can destroy the instance with the global function: WSGFdestroyWindow().//destroy the instance. WSGFdestroyWindow(object);Do not call WSGFdestroyWindow() with the same instance twice, and do not access the destroyed instance, because it causes a fatal memory error.
Copyright(C) WideStudio/MWT Development Team, 1999-2005 | Last modified: Jul 31, 2005 |