次の方法で共有


MonitorEnumProc (Compact 2013)

3/26/2014

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

Syntax

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 Value

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

Header

windows.h

Library

coredll.lib

See Also

Reference

Multiple Screens Functions
EnumDisplayMonitors

Other Resources

RECT