Finding the dialog box that is currently realized

I have a PtAskQuestion that pops up under certain condition, How Do I find
the Dialog box that is currently
being realized so I can pass it as the parent of the PtAskQuestion? thank
you

The function PtNextTopLevelWidget() (with an arg of NULL for the first call)
will walk all of the “top-level” widgets (ie windows) in your application.
For each one, test using PtWidgetIsRealized() to see if it’s realized.

This approach might lead to problems though, if there’s more than one window
in your application realized at the time. You might end up blocking the
wrong one. One possible way to avoid this situation is to consider using
the newer equivalent dialog function, PtAlert() with a NULL parent and the
Pt_BLOCK_ALL flag. This will block all realized windows in your application
while the dialog is up.


If you specify a parent of NULL the dialog will be parented to the “current
parent”, which is the last container that was created.
“ran zhang” <rzhang@vamcointernational.com> wrote in message
news:a52pdm$eje$1@inn.qnx.com

I have a PtAskQuestion that pops up under certain condition, How Do I find
the Dialog box that is currently
being realized so I can pass it as the parent of the PtAskQuestion? thank
you