Gen EDGE

  • 1.  How to close duplicate Primary Windows

    Posted Mar 21, 2018 06:30 AM

    Hi All,

     

    I need your help here for below new requirement. Can you please provide your suggestion. 

     

    We are using CA GEN 8.0. There is a WINDOW GUI CLIENT Procedure "MAIN" that has only one Primary window. From this primary window, we can navigate to other client procedures/screens. User clicks the MAIN.EXE file and invoke the application.

     

    Till date, they are using only one window/instance, that is one time .EXE click and use only one window,  no need for duplicate/separate window by repeatedly clicking MAIN.EXE.

     

    But today there is a need for the user to open and use multiple windows open. That is multiple times, the user will click MAIN.EXE and use multiple duplicate/separate Primary Window. We need to add a new push button ("Close Older Sessions") to the Primary Window. When the user click the new push button ("Close Older Sessions") on the recently opened Primary window, previously opened Primary windows (not the current window where the user clicks the push button) has to be closed.

     

    For Example, 

     

    Three windows are opened the user one after another. When the user clicks the push button ("Close Older Sessions") on third recent window, the first and second windows should be closed. Third window should remain open. 

     

    I am aware that we can get the handle for each window and manipulate the window and its controls thru External action block (C source code). When each window opens, we can write the handle value to a text file on user machine. When the user clicks the push button, that time we can read each handle value and send WM_CLOSE winapi command for closing the older sessions. 

     

    I am not sure about my idea. So, I need your help in finding better solution for my requirement. Please suggest. 

     

     

    With thanks

    Vijayakumar

     

     



  • 2.  Re: How to close duplicate Primary Windows

    Broadcom Employee
    Posted Mar 21, 2018 08:56 PM

    Hi Vijay,

    In previous similar Gen user requests I have seen, the EAB solution to use WM_CLOSE on the window handle is normally what has been used, but let us see if other community users have additional suggestions.

     

    Regards,

     

    Lynn 



  • 3.  Re: How to close duplicate Primary Windows

    Broadcom Employee
    Posted Mar 22, 2018 12:50 PM

    Vijay,

     

    How are you duplicating the main window?

     

    Normally, in Gen, it's done by defining the window as modeless, multiple instances, but the only way to duplicate the windows is through a flow. In your description, I don't see any mention of such flow.

     

    Regards

    Christian