@PIDHWNDS — Returns a list of windows created by the specified process.

Syntax:
%@PIDHWNDS[program,flags]

programprogram name or process ID; wildcards are supported
flagsbitmapped:
    1: return handles in hexadecimal
    128: sort the list into ascending order

You can specify the program as:

Window handles will be returned as a space-separated list of decimal or hexadecimal numbers.

If no matching process is found, or if no windows belong to that process, then @PIDHWNDS will return an empty string.