![]() |
Programming Guide |
WideStudio Index Table of contents |
Como criar e deletar instâncias
Como criar instâncias
Utilize o método "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.
Como deletar instâncias
Utilize WSGFdestroyWindow().//destroy the instance. WSGFdestroyWindow(object);Não chame "WSGFdestroyWindow()" com o mesmo name duas vêzes, e não tente acessar uma instância distruída, porque gerará "fatal memory error" (erro fatal de memória).
Copyright(C) WideStudio Development Team, 1999-2005 | Last modified: Jan 05, 2005 |