WideStudio/MWT Logo
WideStudio/MWT
Programming Guide
WideStudio/MWT Index
Table of contents


How to get the parent instance

You can get the parent instance with the method: WSCbase::getParent().

In the following sample, it acquires the parent instance which places the instance "object", and set False to the visibility of the parent.

void event_procedure(WSCbase* object){
  //get the parent instance.
  WSCbase* parent = object->getParent();
  //access the parent instance.
  parent->setVisible(False);
}



How to get the parent top level window

You can get the parent window instance with the method: WSCbase::getParentWindow().

In the following sample, it acquires the parent window instance, and pops down the window. Sometimes this scene is found when closing window by a button instance.

void event_procedure(WSCbase* object){
  //get the parent window.
  WSCbase* win = object->getParent();
  //pop-down the window.
  win->setVisible(False);
}


Document Release 3.90 for WideStudio/MWT ver 3.90, Jul 2005


WideStudio/MWT documents index | Table of contents

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