User32EnumDisplayMonitors Method
Enumerates display monitors (including invisible pseudo-monitors associated with the mirroring drivers)
that intersect a region formed by the intersection of a specified clipping rectangle
and the visible region of a device context.
EnumDisplayMonitors(IntPtr, IntPtr, DelegatesEnumMonitorProc, IntPtr) calls an application-defined
DelegatesEnumMonitorProc callback function once
for each monitor that is enumerated.
Note that
GetSystemMetrics (
SM_CMONITORS) counts only the display monitors.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll")]
public static bool EnumDisplayMonitors(
IntPtr hdc,
IntPtr lprcClip,
DelegatesEnumMonitorProc lpfnEnum,
IntPtr dwData
)
<DllImportAttribute("User32.dll">]
Public Shared Function EnumDisplayMonitors (
hdc As IntPtr,
lprcClip As IntPtr,
lpfnEnum As DelegatesEnumMonitorProc,
dwData As IntPtr
) As Boolean
Dim hdc As IntPtr
Dim lprcClip As IntPtr
Dim lpfnEnum As DelegatesEnumMonitorProc
Dim dwData As IntPtr
Dim returnValue As Boolean
returnValue = User32.EnumDisplayMonitors(hdc,
lprcClip, lpfnEnum, dwData)
public:
[DllImportAttribute(L"User32.dll")]
static bool EnumDisplayMonitors(
IntPtr hdc,
IntPtr lprcClip,
DelegatesEnumMonitorProc^ lpfnEnum,
IntPtr dwData
)
[<DllImportAttribute("User32.dll")>]
static member EnumDisplayMonitors :
hdc : IntPtr *
lprcClip : IntPtr *
lpfnEnum : DelegatesEnumMonitorProc *
dwData : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hdc IntPtr
-
A handle to a display device context that defines the visible region of interest.
If this parameter is Zero,
the hdcMonitor parameter passed to the DelegatesEnumMonitorProc function will be Zero,
and the visible region of interest is the virtual screen that encompasses all the displays on the desktop.
- lprcClip IntPtr
-
A pointer to a NativeRectangle structure that specifies a clipping rectangle.
The region of interest is the intersection of the clipping rectangle with the visible region specified by hdc.
If hdc is not Zero,
the coordinates of the clipping rectangle are relative to the origin of the hdc.
If hdc is Zero, the coordinates are virtual-screen coordinates.
This parameter can be Zero if you don't want to clip the region specified by hdc.
- lpfnEnum DelegatesEnumMonitorProc
-
A pointer to a DelegatesEnumMonitorProc application-defined callback function..
- dwData IntPtr
-
Application-defined data that EnumDisplayMonitors(IntPtr, IntPtr, DelegatesEnumMonitorProc, IntPtr) passes directly to the
DelegatesEnumMonitorProc function.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.