函数参考


_WinAPI_MonitorFromWindow

Retrieves a handle to the display monitor that has the largest area of intersection with the specified window.

#Include <WinAPIEx.au3>
_WinAPI_MonitorFromWindow ( $hWnd [, $iFlag] )

参数

$hWnd A handle to the window of interest.
$iFlag [可选参数] The flag that specifies the function's return value if the window does not intersect any display
monitor. This parameter can be one of the following values.

$MONITOR_DEFAULTTONEAREST
$MONITOR_DEFAULTTONULL
$MONITOR_DEFAULTTOPRIMARY

返回值

Success The handle to the monitor that has the largest area of intersection with the window,
or the value depends on the $MONITOR_* constant.
失败: 返回 0 并设置 @error 标志为非 0 值.

注意/说明

If the window is currently minimized, the function uses the rectangle of the window before it was minimized.

相关

详情参考

在MSDN中搜索