From aldeid
Jump to navigation Jump to search


Retrieves the specified system metric or system configuration setting.

Note that all dimensions retrieved by GetSystemMetrics are in pixels.


int WINAPI GetSystemMetrics(
  _In_ int nIndex


nIndex [in]
Type: int
The system metric or configuration setting to be retrieved. This parameter can be one of the following values. Note that all SM_CX* values are widths and all SM_CY* values are heights. Also note that all settings designed to return Boolean data represent TRUE as any nonzero value, and FALSE as a zero value.
For a list of possible values, refer to the MSDN page here.

Return value


Type: int

If the function succeeds, the return value is the requested system metric or configuration setting.

If the function fails, the return value is 0. GetLastError does not provide extended error information.