GetNumberOfPhysicalMonitorsFromHMONITOR function

Retrieves the number of physical monitors associated with an HMONITOR monitor handle. Call this function before calling GetPhysicalMonitorsFromHMONITOR.

Syntax

_BOOL GetNumberOfPhysicalMonitorsFromHMONITOR(
  HMONITOR hMonitor,
  LPDWORD  pdwNumberOfPhysicalMonitors
);

Parameters

hMonitor

A monitor handle. Monitor handles are returned by several Multiple Display Monitor functions, including EnumDisplayMonitors and MonitorFromWindow, which are part of the graphics device interface (GDI).

pdwNumberOfPhysicalMonitors

Receives the number of physical monitors associated with the monitor handle.

Return value

If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header physicalmonitorenumerationapi.h
Library Dxva2.lib
DLL Dxva2.dll

See also

GetPhysicalMonitorsFromHMONITOR

Monitor Configuration Functions