IDesktopWallpaper::GetMonitorRECT method (shobjidl_core.h)
Retrieves the display rectangle of the specified monitor.
HRESULT GetMonitorRECT( [in] LPCWSTR monitorID, [out] RECT *displayRect );
The ID of the monitor to query. You can get this value through GetMonitorDevicePathAt.
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.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code, including the following.
||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.|
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|
|Header||shobjidl_core.h (include Shobjidl.h)|