def child(opts={})
      if opts[:indirect]
        self.class.lookup_window_in_collection(opts) { enum_child_windows }
      elsif opts[:class].is_a?(Regexp) || opts[:title].is_a?(Regexp)
        self.class.lookup_window_in_collection(opts) do
          enum_child_windows.select { |handle| child? handle }
        end
      else
        self.class.lookup_window opts do
          opts[:id] ? get_dlg_item(opts[:id]) : find_window_ex(0, opts[:class], opts[:title])
        end
      end
    end
def child(opts={})
      if opts[:indirect]
        self.class.lookup_window_in_collection(opts) { enum_child_windows }
      elsif opts[:class].is_a?(Regexp) || opts[:title].is_a?(Regexp)
        self.class.lookup_window_in_collection(opts) do
          enum_child_windows.select { |handle| child? handle }
        end
      else
        self.class.lookup_window opts do
          opts[:id] ? get_dlg_item(opts[:id]) : find_window_ex(0, opts[:class], opts[:title])
        end
      end
    end
Finds child window (control) by either control ID or window class/title.
 By default, only direct children are searched.
 Options:
 :id:: integer control id (such as IDOK, IDCANCEL, etc)
 :title:: window title (String or Regexp)
 :class:: window class (String or Regexp)
 :indirect:: search all descendants, not only direct children
 :timeout:: timeout (seconds)
 :raise:: raise this exception instead of returning nil if nothing found