interop::GetDisplayIdFromMonitor function (winrt-microsoft.ui.interop.h)
Gets the DisplayId
that corresponds to the specified hmonitor, if the provided HMONITOR is valid.
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
winrt::Microsoft::UI::DisplayId GetDisplayIdFromMonitor(
const HMONITOR & hmonitor
);
Parameters
hmonitor
Type: const HMONITOR &
The handle of the display monitor for which to get the DisplayId
.
Return value
Type: DisplayId
The display monitor identifier that corresponds to the specified hmonitor, if the provided hmonitor is valid. 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 |