title: Find if window is displayed or not
body: <p>Part of the project that I'm working on involves finding every window that is displayed. I use the <code>EnumWindows()</code> function to go through each window and filter out ones that do not return true on <code>IsWindowVisible()</code>. But even still, I get some weird results which include processes that don't have any visible windows. This is the code:</p>
  
  <pre><code>int main()
  {
      EnumWindows(callback, NULL);
      cin.get();
      return 0;
  }
  
  BOOL CALLBACK callback(HWND hWnd, LPARAM lParam)
  {
      wchar_t windowTitle[256];
      GetWindowText(hWnd, windowTitle, sizeof(windowTitle));
  
      int length = ::GetWindowTextLength(hWnd);
      wstring title(&amp;windowTitle[0]);
      if (!IsWindowVisible(hWnd) || length == 0) return TRUE;
  
      WINDOWPLACEMENT wp;
      GetWindowPlacement(hWnd, &amp;wp);
      cout &lt;&lt; string(title.begin(), title.end()) &lt;&lt; endl;
  
      return TRUE;
  }
  </code></pre>
  
  <p>And this is the result:</p>
  
  <pre><code>C:\Users\qjohh\Documents\Visual Studio 2017\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe
  ConsoleApplication1 (Running) - Microsoft Visual Studio
  Settings
  Settings
  Movies &amp; TV
  Movies &amp; TV
  Calculator
  Calculator
  Microsoft Edge
  Microsoft Edge
  Netflix
  Netflix
  Microsoft Store
  Microsoft Store
  Program Manager
  </code></pre>
  
  <p>All of the processes listed below those belonging to Visual Studio have no windows open, I have not even launched them since my computer's startup. I did some digging, and it turns out that these are considered background processes by the Task Manager (except for <code>Program Manager</code>, which I assume is a core process to the OS)</p>
  
  <p>Is there a way to exclude these from my results?</p>