if (button->window_exists ())                    if (dialog->contains_field (DLG_ID/YES_BUTTON)) 
{                                                {
  ...                                              ...
}                                                }