use of com.sun.jna.platform.win32.WinUser.MONITORENUMPROC in project jna by java-native-access.
the class MonitorInfoDemo method main.
/**
* @param args (ignored)
*/
public static void main(String[] args) {
System.out.println("Installed Physical Monitors: " + User32.INSTANCE.GetSystemMetrics(WinUser.SM_CMONITORS));
User32.INSTANCE.EnumDisplayMonitors(null, null, new MONITORENUMPROC() {
@Override
public int apply(HMONITOR hMonitor, HDC hdc, RECT rect, LPARAM lparam) {
enumerate(hMonitor);
return 1;
}
}, new LPARAM(0));
}
Aggregations