Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Windows not destroyed on close

I have three panel controls on a window (mdi), each of which have an embedded window.
On the close of the window, only two of the three windows are removed/destroyed.

The third window remains in existence, though not visible, every time.

I cannot see any difference in the structure/makeup of these embedded windows. Other than shape and size they are just the same in that they just contain other OLE controls.

Each window is created and embedded one after the other like this:
Setup_panels: // file menu Set_Property(panel_file$, "OLE.Background", "White") NewWindow = Start_Window("FILE_MENU") windowsize = Get_Property('FILE_MENU', 'SIZE') panelsize = Get_Property(panel_file$, 'SIZE') Handle = Get_Property(NewWindow, "HANDLE") Send_Message(panel_file$, "OLE.SetForm", Handle, 1, 1) kazm_Qualify_Ole_Event(panel_file$, OnMouseExit$, true$) Set_Property(panel_file$, '@SIZE', panelsize) Set_Property(panel_file$, '@WSIZE', windowsize) // favourites buttons Set_Property(favourites$, "OLE.Background", DfltColour) NewWindow = Start_Window("FAVOURITES") Windowsize = Get_Property(NewWindow, 'SIZE') panelsize = Get_Property(favourites$, 'SIZE') Handle = Get_Property(NewWindow, "HANDLE") Send_Message(favourites$, "OLE.SetForm", Handle, 1, 1) kazm_Qualify_Ole_Event(favourites$, OnMouseExit$, true$) Set_Property(favourites$, '@SIZE', panelsize) Set_Property(favourites$, '@WSIZE', windowsize) // Open Windows tab Set_Property(Windows$, "OLE.Background", DfltColour) Set_Property(Windows$, "OLE.Border", 'None') NewWindow = Start_Window("MDI_TAB") Set_Property(Windows$, "@WNAME", NewWindow) Handle = Get_Property(NewWindow, "HANDLE") Send_Message(Windows$, "OLE.SetForm", Handle, 1, 1) Return The problem is not noticeable in development but when you hit runtime systems, it means that OI lingers around invisibly and in some cases leads to the client hitting their max users .
In this example I'm working with, it is the same window every time (the last one in the above code) even if I don't start/embed the other two.
If there is any difference between that one and the other two, then it is only in the type of OLE controls that it holds. The first two have a series of buttons whilst the third window has a tab control only.

So that's the explanation of the issue but here's why it is becoming a bigger issue.
We've found the same scenario with the ribbon control. Closing the app, the engine was left running unbeknownst to the users.
Don't embed the backstage windows and the problem doesn't present itself. The backstage windows are unrelated to the three I've mentioned above. More investigation to occur to determine if it is just one of the two backstage windows or both or either or something but I'll let you know when we've gotten that far.

Comments

  • I know I wrote some code to deal with this issue, for it was brought up for both the Ribbon and Panel controls during the Ribbon's beta. If you are not already testing with the latest prelease (version 3.2 RC15), then please download it form here and let me know if it resolves the problem.
  • Hi Kevin,

    Yes I trolled my emails to find that discussion and I believe it was addressed in RC8.
    Perhaps you've done some more since then.
    I'm currently using RC12 but I'll try RC15.

    One point I might not have made clear was that in this instance I was still using the RemoveForm method myself with the destroy parameter set to true.
    I removed that code and the result was the same so clearly your automated destroy was implemented.
    Unfortunately, for whatever reason, it doesn't work on every window and I can't tell what the difference is.
    That said, I checked it in the above scenario by getting the handle of each of the three windows during the close event. Two returned null, the third returned the handle.
    If the handle was returned, I executed a removeform method and then checked the handle again.
    Still there.

    So I trust that you are performing the remove/destroy stuff upon closing a panel or ribbon but it seems that the results are inconsistent.

    I'll try the RC15 and see if there is an improvement.
  • Hi Kevin,

    Tried RC15. Same issue.

    Have emailed you an RDK of the window that won't die just in case that helps.

    Thanks.
  • Any traction on this one?

    Thanks.
  • I'm thinking this is probably the same thing

    Just that I've noticed in this case it is inconsistent.

    The allowing multiple instances allows me to restart the window but in this case I only want to completely close the window so that OI can shut down.
  • Mark,

    No traction yet. The current work around is to pull out those embedded forms and close them yourself first. I want to resolve this, but I have a huge fire I'm trying to put out this week.
Sign In or Register to comment.