GetDpiForMonitor function shcore
void
GetDpiForMonitor()
Queries the dots per inch (dpi) of a display.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/shellscalingapi/nf-shellscalingapi-getdpiformonitor.
Implementation
@pragma('vm:prefer-inline')
void GetDpiForMonitor(
HMONITOR hmonitor,
MONITOR_DPI_TYPE dpiType,
Pointer<Uint32> dpiX,
Pointer<Uint32> dpiY,
) {
final hr$ = HRESULT(_GetDpiForMonitor(hmonitor, dpiType, dpiX, dpiY));
if (hr$.isError) throw WindowsException(hr$);
}