How to add the event procedure on the programsYou can add the event procedure with the method: WSCbase::addProcedure().
Add the event procedure as follows. (A), Create the procedure instance with the specified procedure name and a trigger. (B), Set a address of the procedure and its name with the method: setFunction(). (C) Finally, add the procedure instance to the instance.
void _new_event_procedure(WSCbase*){
//a sample of the event procedure.
//..
}
void event_procedure(WSCbase* object){
//Create the procedure instance which name is "new proc".
//The trigger is WSEV_MOUSE_IN (MOUSE_IN trigger.)
(A) WSCprocedure* ep = new WSCprocedure("new proc",WSEV_MOUSE_IN);
(B) ep->setFunction(_new_event_procedure,"_new_event_procedure");
(C) object->addProcedure(ep);
}
Document Release 3.0 For Use with Wide Studio Release 3.0, Summer 2002
|