title: How do I get the number of displays in windows?
body: <p>I want to count the number of active displays. For Mac I can use the following:</p>
  
  <pre><code>CGDisplayCount nDisplays;
  CGGetActiveDisplayList(0,0, &amp;nDisplays);
  log.printf("Displays connected: %d",(int)nDisplays);
  </code></pre>
  
  <p>How can I achieve the same in Windows? I've found <a href="http://msdn.microsoft.com/en-us/library/dd162610(v=VS.85).aspx" rel="noreferrer">EnumDisplayMonitors</a> but I can't work out how to use it.</p>