3 instantiations of HMONITOR
System.Private.Windows.Core (3)
Windows.Win32.HMONITOR.g.cs (3)
41
public static explicit operator HMONITOR(void* value) => new
HMONITOR
(value);
57
public static explicit operator HMONITOR(IntPtr value) => new
HMONITOR
((void*)value.ToPointer());
59
public static explicit operator HMONITOR(UIntPtr value) => new
HMONITOR
((void*)value.ToPointer());
36 references to HMONITOR
System.Drawing.Common.Tests (1)
Helpers.cs (1)
143
HMONITOR
hmonitor = PInvokeCore.MonitorFromWindow(hwnd, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTOPRIMARY);
System.Private.Windows.Core (25)
Windows.Win32.HMONITOR.g.cs (13)
25
: IEquatable<
HMONITOR
>
35
internal static
HMONITOR
Null => default;
39
public static implicit operator void*(
HMONITOR
value) => value.Value;
41
public static explicit operator
HMONITOR
(void* value) => new HMONITOR(value);
43
public static bool operator ==(
HMONITOR
left,
HMONITOR
right) => left.Value == right.Value;
45
public static bool operator !=(
HMONITOR
left,
HMONITOR
right) => !(left == right);
47
public bool Equals(
HMONITOR
other) => this.Value == other.Value;
49
public override bool Equals(object obj) => obj is
HMONITOR
other && this.Equals(other);
55
public static implicit operator IntPtr(
HMONITOR
value) => new IntPtr(value.Value);
57
public static explicit operator
HMONITOR
(IntPtr value) => new HMONITOR((void*)value.ToPointer());
59
public static explicit operator
HMONITOR
(UIntPtr value) => new HMONITOR((void*)value.ToPointer());
Windows.Win32.PInvokeCore.USER32.dll.g.cs (10)
276
internal static unsafe winmdroot.Foundation.BOOL EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT? lprcClip, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.
HMONITOR
,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpfnEnum, winmdroot.Foundation.LPARAM dwData)
304
internal static extern unsafe winmdroot.Foundation.BOOL EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC hdc, [Optional] winmdroot.Foundation.RECT* lprcClip, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.
HMONITOR
,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpfnEnum, winmdroot.Foundation.LPARAM dwData);
536
/// <inheritdoc cref="GetMonitorInfo(winmdroot.Graphics.Gdi.
HMONITOR
, winmdroot.Graphics.Gdi.MONITORINFO*)"/>
538
internal static unsafe winmdroot.Foundation.BOOL GetMonitorInfo(winmdroot.Graphics.Gdi.
HMONITOR
hMonitor, ref winmdroot.Graphics.Gdi.MONITORINFO lpmi)
562
internal static extern unsafe winmdroot.Foundation.BOOL GetMonitorInfo(winmdroot.Graphics.Gdi.
HMONITOR
hMonitor, winmdroot.Graphics.Gdi.MONITORINFO* lpmi);
823
internal static extern winmdroot.Graphics.Gdi.
HMONITOR
MonitorFromPoint(global::System.Drawing.Point pt, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags);
827
internal static unsafe winmdroot.Graphics.Gdi.
HMONITOR
MonitorFromRect(in winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags)
831
winmdroot.Graphics.Gdi.
HMONITOR
__result = PInvokeCore.MonitorFromRect(lprcLocal, dwFlags);
847
internal static extern unsafe winmdroot.Graphics.Gdi.
HMONITOR
MonitorFromRect(winmdroot.Foundation.RECT* lprc, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags);
858
internal static extern winmdroot.Graphics.Gdi.
HMONITOR
MonitorFromWindow(winmdroot.Foundation.HWND hwnd, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags);
Windows\Win32\PInvokeCore.EnumDisplayMonitors.cs (2)
11
public delegate bool EnumDisplayMonitorsCallback(
HMONITOR
monitor, HDC hdc);
27
private static BOOL EnumDisplayMonitorsNativeCallback(
HMONITOR
monitor, HDC hdc, RECT* lprcMonitor, LPARAM lParam)
System.Windows.Forms (6)
System\Windows\Forms\Screen.cs (6)
14
private readonly
HMONITOR
_hmonitor;
46
private static readonly
HMONITOR
s_primaryMonitor = (
HMONITOR
)unchecked((nint)0xBAADF00D);
50
internal Screen(
HMONITOR
monitor) : this(monitor, default)
54
internal unsafe Screen(
HMONITOR
monitor, HDC hdc)
109
PInvokeCore.EnumDisplayMonitors((
HMONITOR
hmonitor, HDC hdc) =>
System.Windows.Forms.Tests (4)
System\Windows\Forms\ScreenTests.cs (4)
38
Screen screen = new((
HMONITOR
)(nint)1);
40
yield return new object[] { screen, new Screen((
HMONITOR
)(nint)1), true };
41
yield return new object[] { screen, new Screen((
HMONITOR
)(nint)2), false };
46
Screen screen = new((
HMONITOR
)(nint)1);