Author Topic: WinQuerySwitchList Dead Entries  (Read 501 times)

Martin Vieregg

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 74
    • View Profile
WinQuerySwitchList Dead Entries
« on: November 28, 2019, 04:56:40 pm »
I am using the WDsibyl Delphi-like programming environment where I made already a lot of minor changes the last 15 years...

I have got a problem with dead entries in the window list when closing windows. In most cases, all works fine, but when closing the main window of a program without closing sub windows before, some specific sub windows do not disappear from the window list which is accessable via WinQuerySwitchList API call. In the OS/2 window list (Ctrl-ESC), they disappear. But e.g. in the MOLE list which is using the WinQuerySwitchList API function, they are still shown and since ArcaOS, shutdown faiis with a query "continue?".

If I understand the OS/2 API correct, the WinDestroyWindow (hwnd) API call should delete the Window from the list. The API call is executed twice, one for the form window and one for the frame. So it should disappear from the list, but it does not.

Any ideas?

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 36
  • Posts: 850
    • View Profile
Re: WinQuerySwitchList Dead Entries
« Reply #1 on: November 29, 2019, 12:59:52 am »
Hi Martin

As an "occasional programmer" who - mainly - enjoys using WDSibyl for building apps I am wondering if function WinRemoveSwitchEntry may be of help. Must admit to not having tried it myself...

Thanks for your continual input into WDSibyl  :-)


Regards

Pete

Andreas Schnellbacher

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 24
  • Posts: 440
    • View Profile
Re: WinQuerySwitchList Dead Entries
« Reply #2 on: November 29, 2019, 01:24:33 am »
when closing the main window of a program without closing sub windows before, some specific sub windows do not disappear from the window list which is accessable via WinQuerySwitchList API call.
Are you sure that the owner of these subwindows was set correctly?

Martin Vieregg

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 74
    • View Profile
Re: WinQuerySwitchList Dead Entries
« Reply #3 on: December 02, 2019, 11:55:02 am »
Thank you for the two useful hints. The combination of the two hints solved the problem:
- The owner has been set, but the parent when executing WinCreateWCWindow was set to 0 (it seemed that it was me in 2007 who made the fatal changes.)
- before running WinDestroyWindow, I inserted WinRemoveSwitchEntry
Now it seems to work. I will test it awhile and if it is OK, I send the changes to Wolfgang D.