Close Windows

Hello all,

Is there any way to close all open windows?

I open the windows with the function "WinNewAt" and i allow to be open 15 windows.

When i change the user i want to close all the windows.

Is that possible?

  • Take a look at FUNCTION Deactivate_Pinned() below..


    Here is a Cicode example that creates three pinned windows using the current window as the parent:

    window 1 : coordinates - 0,0, size - 100, 100, resize mode - maintain aspect ratio
    window 2 : coordinates - 100,0, size - 100, 100, resize mode - stretch content to fit window bounds
    window 3 : coordinates - 0,100, size - 200, 100, resize mode - maintain content size

    INT windowPin1 = -1;
    INT windowPin2 = -1;
    INT windowPin3 = -1;
    INT windowParent = -1;

    FUNCTION MyPinnedLayout()
    IF windowParent = -1 THEN
    windowParent = WinNumber();
    END

    IF windowParent <> -1 THEN
    WinGoto(windowParent);
    windowPin1 = WinNewPinAt("page1", 0, 0, 0, 100, 100);
    IF -1 = windowPin1 THEN
    Prompt("WinNewPinAt failed with error: " + ErrMsg(IsError()));
    END

    WinGoto(windowParent);
    windowPin2 = WinNewPinAt("page2", 100, 0, 4096, 100, 100);
    IF -1 = windowPin2 THEN
    Prompt("WinNewPinAt failed with error: " + ErrMsg(IsError()));
    END

    WinGoto(windowParent);
    windowPin3 = WinNewPinAt("page3", 0, 100, 1024, 200, 100);
    IF -1 = windowPin3 THEN
    Prompt("WinNewPinAt failed with error: " + ErrMsg(IsError()));
    END

    WinGoto(windowParent);
    END
    END

    FUNCTION Deactivate_Pinned()
    WinFreeEx(windowPin1);
    WinFreeEx(windowPin2);
    WinFreeEx(windowPin3);
    END