![]() | Programming Guide | WideStudio/MWT Index Table of contents |
How to add the event procedure on the programs
You can add the event procedure with the method: WSCbase::addProcedure().Add the event procedure as follows.
The method Description addProcedure(WSCprocedure*) Add the new event procedure.
- (A), Create the procedure instance with the specified procedure name and a trigger.
- (B), Set an 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); }
Copyright(C) WideStudio/MWT Development Team, 1999-2005 | Last modified: Jul 31, 2005 |