Compartilhar via


MonitorEnumProc (Windows CE 5.0)

Send Feedback

This function is an application-defined callback function that is called by the EnumDisplayMonitors function.

BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor,HDC hdcMonitor,LPRECT lprcMonitor,LPARAM dwData);

Parameters

  • hMonitor
    [in] Handle to the screen. This value should not be NULL.
  • hdcMonitor
    [in] Handle to a device context. The device context should have color attributes that are appropriate for the screen identified by hMonitor. The clipping area of the device context is set to the intersection of the visible region of the device context identified by the hdc parameter of EnumDisplayMonitors, the rectangle pointed to by the lprcClip parameter of EnumDisplayMonitors, and the screen rectangle. This value is NULL if the hdc parameter of EnumDisplayMonitors is NULL.
  • lprcMonitor
    [in] Pointer to a RECT structure. If hdcMonitor is not NULL, this rectangle is the intersection of the clipping area of the device context identified by hdcMonitor and the screen rectangle, and the rectangle coordinates are device-context coordinates. If hdcMonitor is NULL, this rectangle is the screen rectangle, and the rectangle coordinates are virtual screen coordinates.
  • dwData
    [in] DWORD that specifies application-defined data that EnumDisplayMonitors passes directly to this function.

Return Values

TRUE specifies that you want to continue enumerating screens. FALSE specifies that you want to stop the enumerating screens.

Remarks

EnumDisplayMonitors calls a specified MonitorEnumProc function once for each screen in the calculated enumeration set. EnumDisplayMonitors always passes a handle to the screen to MonitorEnumProc.

If the hdc parameter of EnumDisplayMonitors is not NULL, MonitorEnumProc also receives a handle to a device context whose color format is appropriate for the screen. You can use this handle to paint into the device context in a manner that is optimal for the screen.

A value of type MONITORENUMPROC is a pointer to a this function.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

EnumDisplayMonitors | RECT

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.