-1

I get list of windows with Win32.EnumWindows and then filter them to keep the ones I want. I want to keep the normal, visible Skype window and skip the hidden Microsoft Edge window. (I use Chrome, and no accessible instances of Edge are visible in my Alt-TAB output or on my screen.)

I already filter out a few Edge windows that are of class Windows.UI.Core.CoreWindow but there is one Edge window still in the list. Maybe it is a main or parent window or something? Maybe the Task Manager window or the Settings windows that I have open are Edge underneath the hood?

I dumped the properties of both Skype and Edge windows, and they are the same for the items that I looked at. (I recognize that having WS_VISIBLE set does not mean that I get to see the window.) Here are the items that are identical for both windows.

Skype window: (Identical to the output for the Edge window that I can't see.)
  Is visible.
  Has no owner.
  Has no parent.
  Is not APPWIN.
  Is not a toolwindow.
  Is not a cloaked store window.
  Class is ApplicationFrameWindow

Could anyone give me an answer on how to identify the Edge window (other than by using its name as a special case in the code) as distinct from the Skype window? Or maybe point me to a web article that I haven't seen yet? (I have looked at a dozen or so, without success.) Thank you.

Kevin
  • 1,548
  • 2
  • 19
  • 34
  • Did you try looking at each window's title text? I don't see that in your list of properties – Remy Lebeau Oct 02 '19 at 18:57
  • Yes, I did that. But as I mentioned in the question I would prefer not to special-case the code by using specific app titles. I was hoping to find some non-name way of recognizing the weird Edge window. – Kevin Oct 02 '19 at 19:26
  • As you have noticed, they are both based on the same UI framework (as they are both Store apps), so the title is pretty much the only unique value the UI gives you. – Remy Lebeau Oct 02 '19 at 19:41
  • only by window name. this both windows have the same class *ApplicationFrameWindow*, the same styles, created by the same process - *ApplicationFrameHost.exe* - so you not found any different, except window name. and what is your goal here ? – RbMm Oct 03 '19 at 17:05

1 Answers1

-1

Thank you everyone for your help. I ended up using the window titles because I found that there were several windows on my list that did not show up in the normal Alt-TAB display. Special cases were always required (on the net examples) to remove them from the list to help match the normal Alt-TAB display. Once I accepted the need for special cases, then using the title was the easiest way for these two windows.

I also learned that Microsoft Edge (and probably other apps too) start-up some background processes and windows even if you are not using them. Someone on the net said that you could disable these background processes in Settings, so I did that to get rid of some unwanted windows on my Alt-TAB (or nearly Alt-TAB) list.

I am currently researching how to spot windows (like Edge and Settings) that have IS_VISIBLE windows (that you can't see, but that have all the attributes mentioned earlier in the original question) attached to background processes that don't show up in the Apps list in the Task Manager.

Very strange. The OS obviously knows how to spot those windows and keep them out of the Task Manager Apps list and the Alt-TAB display. I wish I knew how to do it. Maybe the answer lies with processes, as Rita said earlier (but I didn't see any example of that method in my net research). Even Raymond Chen's famous method of walking ancestors does not produce the right answer that matches the Alt-TAB display.

Kevin
  • 1,548
  • 2
  • 19
  • 34