interop::GetMonitorFromDisplayId function (winrt-microsoft.ui.interop.h)

Gets the display monitor handle that corresponds to the specified displayId, if the provided displayId is valid and the system has an HMONITOR that represents the display monitor.

Note

This API is declare in the Microsoft.UI.Interop.h header file that's in the Windows App SDK's \include\winrt folder.

C#. For C# desktop application developers, the interop functions in this header are wrapped by the methods of the Microsoft.UI.Win32Interop class.

Syntax

HMONITOR GetMonitorFromDisplayId(
  const winrt::Microsoft::UI::DisplayId & displayId
);

Parameters

displayId

Type: const DisplayId &

The identifier for the display.

Return value

Type: HMONITOR

The display monitor handle that corresponds to the specified displayId, if the provided displayId is valid and the system has an HMONITOR that represents the display monitor. Otherwise, null.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 (with Windows App SDK 1.0 or later)
Header winrt-microsoft.ui.interop.h

See also

Manage app windows