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

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


        if(fullScreen) {
            windowState = getWindowState(hWnd);
            ExtendedUser32.INSTANCE.SetWindowLong(hWnd, GWL_STYLE, windowState.getStyle() & ~(WS_CAPTION | WS_THICKFRAME));
            ExtendedUser32.INSTANCE.SetWindowLong(hWnd, GWL_EXSTYLE, windowState.getExStyle() & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
            MONITORINFO monitorInfo = getMonitorInfo(hWnd);
            RECT rect = monitorInfo.rcMonitor;
            ExtendedUser32.INSTANCE.SetWindowPos(hWnd, null, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
        }
        else {
            ExtendedUser32.INSTANCE.SetWindowLong(hWnd, GWL_STYLE, windowState.getStyle());
            ExtendedUser32.INSTANCE.SetWindowLong(hWnd, GWL_EXSTYLE, windowState.getExStyle());
View Full Code Here


        if(windowState.getMaximized()) {
            ExtendedUser32.INSTANCE.SendMessage(hWnd, User32.WM_SYSCOMMAND, new WPARAM(ExtendedUser32.SC_RESTORE), new LPARAM(0));
        }
        windowState.setStyle(ExtendedUser32.INSTANCE.GetWindowLong(hWnd, ExtendedUser32.GWL_STYLE));
        windowState.setExStyle(ExtendedUser32.INSTANCE.GetWindowLong(hWnd, ExtendedUser32.GWL_EXSTYLE));
        RECT rect = new RECT();
        boolean gotWindowRect = ExtendedUser32.INSTANCE.GetWindowRect(hWnd, rect);
        if(gotWindowRect) {
            windowState.setLeft(rect.left);
            windowState.setTop(rect.top);
            windowState.setRight(rect.right);
View Full Code Here

    }

    public void testGetTypeInfoCount() {
        Dispatch dispatch = this.createIDispatch();
       
        UINTByReference pctinfo = new UINTByReference();
        dispatch.GetTypeInfoCount(pctinfo);
       
        int intValue = pctinfo.getValue().intValue();
        assertEquals(1, intValue);
    }
View Full Code Here

    public void testGetNames() {
        ITypeInfo typeInfo = getTypeInfo();
        MEMBERID memid = new MEMBERID(1);
        BSTR[] rgBstrNames = new BSTR[1];
        UINT cMaxNames = new UINT(1);
        UINTByReference pcNames = new UINTByReference();
        HRESULT hr = typeInfo.GetNames(memid, rgBstrNames, cMaxNames, pcNames);

        COMUtils.checkRC(hr);
        assertEquals(0, hr.intValue());
        //System.out.println("rgBstrNames: " + rgBstrNames[0].getValue());
View Full Code Here

     *            the max names
     * @return the names
     */
    public String[] getNames(MEMBERID memid, int maxNames) {
        BSTR[] rgBstrNames = new BSTR[maxNames];
        UINTByReference pcNames = new UINTByReference();
        HRESULT hr = this.typeInfo.GetNames(memid, rgBstrNames, new UINT(
                maxNames), pcNames);
        COMUtils.checkRC(hr);

        int cNames = pcNames.getValue().intValue();
        String[] result = new String[cNames];

        for (int i = 0; i < result.length; i++) {
            result[i] = rgBstrNames[i].getValue();
            OLEAUTO.SysFreeString(rgBstrNames[i]);
View Full Code Here

    public Invoke Invoke(PVOID pvInstance, MEMBERID memid, WORD wFlags,
            DISPPARAMS.ByReference pDispParams) {

        VARIANT.ByReference pVarResult = new VARIANT.ByReference();
        EXCEPINFO.ByReference pExcepInfo = new EXCEPINFO.ByReference();
        UINTByReference puArgErr = new UINTByReference();

        HRESULT hr = this.typeInfo.Invoke(pvInstance, memid, wFlags,
                pDispParams, pVarResult, pExcepInfo, puArgErr);
        COMUtils.checkRC(hr);

        return new Invoke(pVarResult, pExcepInfo, puArgErr.getValue()
                .intValue());
    }
View Full Code Here

     * @return the containing type lib
     */
    public ContainingTypeLib GetContainingTypeLib() {

        PointerByReference ppTLib = new PointerByReference();
        UINTByReference pIndex = new UINTByReference();

        HRESULT hr = this.typeInfo.GetContainingTypeLib(ppTLib, pIndex);
        COMUtils.checkRC(hr);

        return new ContainingTypeLib(new TypeLib(ppTLib.getValue()), pIndex
                .getValue().intValue());
    }
View Full Code Here

    private void newAppBar() {
        APPBARDATA data = new APPBARDATA.ByReference();
        data.cbSize.setValue(data.size());
        data.uCallbackMessage.setValue(WM_USER + 1);

        UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_NEW), data);
        assertNotNull(result);
    }
View Full Code Here

    }

    private void removeAppBar() {
        APPBARDATA data = new APPBARDATA.ByReference();
        data.cbSize.setValue(data.size());
        UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_REMOVE), data);
        assertNotNull(result);

    }
View Full Code Here

        assertNotNull(result);

    }

    private void queryPos(APPBARDATA data) {
        UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_QUERYPOS), data);

        assertNotNull(h);
        assertTrue(h.intValue() > 0);

    }
View Full Code Here

TOP

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

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.