pub fn enum_by_until<T: FnMut(HWND) -> i32>(
    parent: Option<HWND>,
    cmp_func: T
) -> Result<()>
Expand description

Enumerates over windows handles and calls callback on each

Note

Enumeration continues until callback return non-zero value.

WinAPI error

Due to enum_by_until allowing to interrupt enumeration, having error set cause inability detect accurately whether enumeration failed or has been interrupted. Hence this function always set last error to 0.

Parameters

  • parent - Handle of parent window to look up through its children only. Optional.
  • cmp_func - Callback that will be called on each window.

Return

  • Ok - Success.
  • Err - Error reason.