title: Get video adapter that the monitor is plugged to
body: <p>I'm having multiple monitors plugged to the machine: 2 of them are plugged to the external video adapter, 2 of them - to the internal videochip.
  I need to know what monitors are plugged to external video adapter, how to find it out?</p>
  
  <p>I've looked toward <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd162609%28v=vs.85%29.aspx" rel="nofollow">EnumDisplayDevices</a> and I see that <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd183569%28v=vs.85%29.aspx" rel="nofollow">DISPLAY_DEVICE</a> structure has <code>DISPLAY_DEVICE_PRIMARY_DEVICE</code> flag, that can show me on what video-device is the primary screen. But it's not enough to solve the whole task.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I've tried <code>EnumDisplayDevices</code> and in its <code>DISPLAY_DEVICE</code> object there is a field <code>DeviceString</code>. </p>
  
  <pre><code>DISPLAY_DEVICE DispDev; 
  ZeroMemory(&amp;DispDev, sizeof(DispDev));
  DispDev.cb = sizeof(DispDev); 
  DWORD nDeviceIndex = 0;
  EnumDisplayDevices(NULL, nDeviceIndex, &amp;DispDev, 0);
  
  // DispDev.DeviceString now is what I need
  </code></pre>
  
  <p>It consists of the name of the video-adapter, for example <code>Intel(R) HD Graphics 4000</code>. 
  But names can be different, how to separate integrated video and external video</p>