if (window_exists (button))                      if (window_exists (dialog, DLG_ID/YES_BUTTON)) 
{                                                {
  ...                                              ...
}                                                }