WPARENT( ) Function Example

The following example defines a parent and child window. It then uses WPARENT( ) to identify which window is the parent.

CLEAR ALL
CLEAR
DEFINE WINDOW wParent ;
   FROM 1,1 TO 20,20 ;
   TITLE 'wParent'     && Parent window
ACTIVATE WINDOW wParent
DEFINE WINDOW wChild ;
   FROM 1,1 TO 10,10 ;
   TITLE 'wChild' ;
   IN WINDOW wParent  && Child window
ACTIVATE WINDOW wChild
WAIT WINDOW 'The parent window is ' + WPARENT( )
RELEASE WINDOW wParent, wChild