The easiest way is to add the dialog to an array when activating (use on init clause) and delete from the array when closing (use valid clause).
Other way is
aWnd := GetAllWin()
Check if each oWnd in aWnd is a valid object and if it is a dialog and add it to aDialog array