WideStudio/MWT Class Reference

WideStudio/MWT Home
Up to


Class Name

WSCvthread

Specification of methods



Description of executeThread

Form
long executeThread()
Function
This function executeThread() generates a THREAD-STARTED event, and also generates a new sub-thread, in which an event procedure is executed.
Description
Parameters
None.
Return value
Returns WS_NO_ERR if it succeeds; returns otherwise if it fails.
Notice
It is not required that operating the instances of WideStudio's GUI from sub-thread without exclusive operation, because the instances of WideStudio's GUI is thread-unsafe. By calling member function: sendActivateEvent(), it executes an event procedure set by ACTIVATE in main-thread, and the instances are safely operated by the event procedure.
Samples



Description of sendActivateEvent

Form
long sendActivateEvent()
Function
Calling sendActivateEvent() in sub-thread executes an event procedure set by ACTIVATE in main-thread, and the instances are safely operated by the event procedure.
Description
Parameters
None.
Return value
Returns WS_NO_ERR if it succeeds; returns otherwise if it fails.
Notice
It is not required that operating the instances of WideStudio's GUI from sub-thread without exclusive operation, because the instances of WideStudio's GUI is thread-unsafe. By calling member function: sendActivateEvent(), it executes an event procedure set by ACTIVATE in main-thread, and the instances are safely operated by the event procedure.
Samples



Description of onActivate

Form
void onActivate()
Function
Calling sendActivateEvent() in sub-thread send an ACTIVATE event and executes onActivate() in main-thread.
Description
The ACTIVATE event can be handled by overloading of this method.
Parameters
None.
Return value
None.
Notice
None.
Samples
void new_class::onActivate(){
  // This event method is called when ACTIVATE event is generated.

  // call the method of the parent class.
  old_class::onActivate();
}



Description of onThreadStarted

Form
void onThreadStarted()
Function
Calling executeThread() in main-thread generates a new sub-thread and execute onThreadStarted() in the sub-thread.
Description
The THREAD_STARTED event can be handled by overloading of this method.
Description
Parameters
None.
Return value
None.
Notice
None.
Samples
void new_class::onThreadStarted(){
  // This event method is called when THREAD-STARTED event is generated.

  // call the method of the parent class.
  old_class::onThreadStarted();
}


Document Release 3.90

For use with WideStudio/MWT Release 3.90, Summer 2005


WideStudio/MWT Home | Up to

Copyright(C) WideStudio/MWT Development Team, 1999-2005 Last modified: June 25, 2005