次の方法で共有


GetMonitorInfo (Compact 2013)

3/26/2014

This function retrieves information about a screen.

Syntax

BOOL GetMonitorInfo(
  HMONITOR hMonitor, 
  LPMONITORINFO lpmi 
);

Parameters

  • hMonitor
    [in] Handle to the screen of interest.

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError.

Remarks

This function can retrieve information about a screen in either a MONITORINFO or MONITORINFOEX structure. MONITORINFOEX, a superset of MONITORINFO, has one additional member: a string that contains a name for the screen. Most applications do not need to use a screen name and can use fewer bytes by using MONITORINFO.

You must set the cbSize member of either structure to the value that you obtain by calling the sizeof operator for MONITORINFO or MONITORINFOEX before you call GetMonitorInfo. Setting cbSize allows GetMonitorInfo to determine the type of structure you are passing to it.

Requirements

Header

windows.h

Library

coredll.lib

See Also

Reference

Multiple Screens Functions
MONITORINFO
MONITORINFOEX