GetMonitorInfo

 

Description

 

The GetMonitorInfo function retrieves information about a display monitor.

 

C++ Syntax

 

BOOL GetMonitorInfo(

__in  HMONITOR hMonitor,

__out LPMONITORINFO lpmi

);

 

PowerBASIC Syntax

 

FUNCTION GetMonitorInfo ( _

BYVAL hMonitor AS DWORD, _

BYREF lpmi AS ANY _

) AS LONG

 

Unicode version:

 

FUNCTION GetMonitorInfoW ( _

BYVAL hMonitor AS DWORD, _

BYREF lpmi AS ANY _

) AS LONG

 

Parameters

 

hMomitor

 

[in] Handle to the display monitor of interest.

 

lpmi

 

[out] Pointer to a MONITORINFO or MONITORINFOEX structure that receives information about the specified display monitor.

 

You must set the cbSize member of the structure to SIZEOF( MONITORINFO ) or SIZEOF( MONITORINFOEX ) before calling the GetMonitorInfo function. Doing so lets the function determine the type of structure you are passing to it.

 

The MONITORINFOEX structure is a superset of the MONITORINFO structure. It has one additional member: a string that contains a name for the display monitor. Most applications have no use for a display monitor name, and so can save some bytes by using a MONITORINFO structure.

 

Return Value

 

If the function succeeds, the return value is nonzero.

 

If the function fails, the return value is zero.

 

Remarks

 

Windows 98/Me: GetMonitorInfoW is supported by the Microsoft Layer for Unicode.

 

Valid XHTML 1.0 Transitional