Package com.sun.jna.platform.win32.WinDef

Examples of com.sun.jna.platform.win32.WinDef.HWND


            fail("GetProcessId(NULL) should fail");
        }
    }

    public void testConvertHWND_BROADCAST() {
        HWND hwnd = WinUser.HWND_BROADCAST;
        NativeMappedConverter.getInstance(hwnd.getClass()).toNative(hwnd, null);
    }
View Full Code Here


            update(true, true);
        }
    }

    private HWND getHwnd(Window w) {
        HWND hwnd = new HWND();
        hwnd.setPointer(Native.getWindowPointer(w));
        return hwnd;
    }
View Full Code Here

    }
   
    private void updateW32(boolean a, boolean i) {
        User32 user = User32.INSTANCE;
        GDI32 gdi = GDI32.INSTANCE;
        HWND hWnd = null;

        if (!alphaWindow.isDisplayable()) {
            alphaWindow.pack();
            hWnd = getHwnd(alphaWindow);
            int flags = user.GetWindowLong(hWnd, WinUser.GWL_EXSTYLE);
View Full Code Here

    // register window class
    User32.INSTANCE.RegisterClassEx(wClass);
    getLastError();

    // create new window
    HWND hWnd = User32.INSTANCE
        .CreateWindowEx(
            User32.WS_EX_TOPMOST,
            windowClass,
            "My hidden helper window, used only to catch the windows events",
            0, 0, 0, 0, 0,
            null, // WM_DEVICECHANGE contradicts parent=WinUser.HWND_MESSAGE
            null, hInst, null);

    getLastError();
    System.out.println("window sucessfully created! window hwnd: "
        + hWnd.getPointer().toString());

    Wtsapi32.INSTANCE.WTSRegisterSessionNotification(hWnd,
        Wtsapi32.NOTIFY_FOR_THIS_SESSION);

    /* this filters for all device classes */
 
View Full Code Here

        final int msg = User32Util.registerWindowMessage("RM_UNITTEST");
        assertTrue(msg >= 0xC000 && msg <= 0xFFFF);
    }

    public final void testCreateWindow() {
        final HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        try {
            assertTrue(Pointer.nativeValue(hWnd.getPointer()) > 0);
        } finally {
            User32Util.destroyWindow(hWnd);
        }
    }
View Full Code Here

            User32Util.destroyWindow(hWnd);
        }
    }

    public final void testCreateWindowEx() {
        final HWND hWnd = User32Util.createWindowEx(0, "Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        try {
            assertTrue(Pointer.nativeValue(hWnd.getPointer()) > 0);
        } finally {
            User32Util.destroyWindow(hWnd);
        }
    }
View Full Code Here

  }

  public Wtsapi32Test() {
    Frame frame = new Frame();
    frame.setVisible(true);
    this.hwnd = new HWND(Native.getWindowPointer(frame));
  }
View Full Code Here

     * Count GPUs
     * @return the number of available GPUs
     */
    public static int countGpusNV() {
        // create a dummy window
        HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        HDC hdc = User32.INSTANCE.GetDC(hWnd);

        // set a compatible pixel format
        PIXELFORMATDESCRIPTOR.ByReference pfd = new PIXELFORMATDESCRIPTOR.ByReference();
        pfd.nVersion = 1;
View Full Code Here

    @Test
    public final void testMonitorFromWindow() {
        int dwFlags = WinUser.MONITOR_DEFAULTTOPRIMARY;

        HWND hwnd = new HWND();
        assertNotNull(User32.INSTANCE.MonitorFromWindow(hwnd, dwFlags));
    }
View Full Code Here

        junit.textui.TestRunner.run(OpenGL32Test.class);
    }

    public void testGetStringGLVersion() {
        // create a dummy window
        HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        HDC hdc = User32.INSTANCE.GetDC(hWnd);

        // set a compatible pixel format
        PIXELFORMATDESCRIPTOR.ByReference pfd = new PIXELFORMATDESCRIPTOR.ByReference();
        pfd.nVersion = 1;
View Full Code Here

TOP

Related Classes of com.sun.jna.platform.win32.WinDef.HWND

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.