IDesktopWallpaper::GetMonitorRECT method
Retrieves the display rectangle of the specified monitor.
Syntax
HRESULT GetMonitorRECT(
[in] LPCWSTR monitorID,
[out] RECT *displayRect
);
Parameters
- monitorID [in]
-
The ID of the monitor to query. You can get this value through GetMonitorDevicePathAt.
- displayRect [out]
-
A pointer to a RECT structure that, when this method returns successfully, receives the display rectangle of the monitor specified by monitorID, in screen coordinates.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code, including the following.
| Return code | Description |
|---|---|
|
The monitor specified by monitorID is not currently attached to the system. |
|
A NULL pointer was provided in displayRect. |
|
The ID supplied in monitorID cannot be found. |
Requirements
|
Minimum supported client |
Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also
Show: