MONITORINFO structure (winuser.h)
The MONITORINFO structure contains information about a display monitor.
The GetMonitorInfo function stores information in a MONITORINFO structure or a MONITORINFOEX structure.
The MONITORINFO structure is a subset of the MONITORINFOEX structure. The MONITORINFOEX structure adds a string member to contain a name for the display monitor.
Syntax
typedef struct tagMONITORINFO {
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
} MONITORINFO, *LPMONITORINFO;
Members
cbSize
The size of the structure, in bytes.
Set this member to sizeof ( MONITORINFO )
before calling the GetMonitorInfo function. Doing so lets the function determine the type of structure you are passing to it.
rcMonitor
A RECT structure that specifies the display monitor rectangle, expressed in virtual-screen coordinates. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
rcWork
A RECT structure that specifies the work area rectangle of the display monitor, expressed in virtual-screen coordinates. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
dwFlags
A set of flags that represent attributes of the display monitor.
The following flag is defined.
Value | Meaning |
---|---|
MONITORINFOF_PRIMARY | This is the primary display monitor. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | winuser.h (include Windows.h) |