title: EnumWindows does not detect windows
body: <p>I am trying to use EnumWindows to print out the titles of all visible windows. </p>
  
  <p>It was working at first, EnumWindows was calling the callback function createWindow() multiple times with each call of EnumWindows. But without adding any meaningful code it stopped working and now only calls createWindow() once with a handle of a not visible window.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>int main()
  {
      int row = 2;
      int col = 2;
  
      vector&lt;Window&gt; detectedWindows((row * col) + 4);
  
      EnumWindows(&amp;createWindow, (LPARAM)&amp;detectedWindows);
  }
  
  BOOL CALLBACK createWindow(HWND input, LPARAM storage)
  {
      if (IsWindowVisible(input))
      {
          TCHAR titleTchar[30];
  
          GetWindowText(input, titleTchar, 30);
  
          wcout &lt;&lt; titleTchar &lt;&lt; endl;
  
          CString titleCstr = titleTchar;
          CT2CA converting(titleCstr);
          string title(converting);
  
          cout &lt;&lt; title &lt;&lt; endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>There are no recorded error messages. GetLastError returns 0.</p>