Search in sources :

Example 1 with MONITORENUMPROC

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));
}
Also used : HMONITOR(com.sun.jna.platform.win32.WinUser.HMONITOR) RECT(com.sun.jna.platform.win32.WinDef.RECT) HDC(com.sun.jna.platform.win32.WinDef.HDC) LPARAM(com.sun.jna.platform.win32.WinDef.LPARAM) MONITORENUMPROC(com.sun.jna.platform.win32.WinUser.MONITORENUMPROC)

Aggregations

HDC (com.sun.jna.platform.win32.WinDef.HDC)1 LPARAM (com.sun.jna.platform.win32.WinDef.LPARAM)1 RECT (com.sun.jna.platform.win32.WinDef.RECT)1 HMONITOR (com.sun.jna.platform.win32.WinUser.HMONITOR)1 MONITORENUMPROC (com.sun.jna.platform.win32.WinUser.MONITORENUMPROC)1