Consultor Eletrônico



Kbase P4328: How To Check To See If A Child Window Still Exists
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Verified

GOAL:

How to check to see if a child window still exists

FACT(s) (Environment):

Windows 32 Intel
Windows NT 32 Intel/Windows 2000

FIX:

First, use the following code to run the child window:

DEFINE VARIABLE hChild    AS HANDLE  NO-UNDO.
DEFINE VARIABLE hChildUID AS INTEGER NO-UNDO.

RUN SomeChildWindow.w PERSISTENT SET hChild.

ASSIGN hChildUID = hChild:UNIQUE-ID.

Second, use the following code to check whether the child window still exists:

IF VALID-HANDLE(hChild) AND hChildUID = hChild:UNIQUE-ID THEN
   /* child window still exists, do whatever you want to do */
ELSE
    MESSAGE "Child Window is Gone" VIEW-AS ALERT-BOX.