How to use the IVirtualDesktopManager interface in C++/Win32
<p>I need to search for maximized windows from Win32 (by using <code>EnumWindows</code>) but I also want to filter for windows which are on the current virtual desktop. On MSDN, I found a page about the <a href="https://msdn.microsoft.com/de-de/library/windows/desktop/mt186440%28v=vs.85%29.aspx?f=255&amp;MSPPError=-2147217396" rel="nofollow"><code>IVirtualDesktopManager</code> interface</a> but there seems to be no information on how to use this interface.</p>

<pre class="lang-cpp prettyprint-override"><code>IVirtualDesktopManager::IsWindowOnCurrentVirtualDesktop(/*args...*/);
</code></pre>

<p>Throws the following error:</p>

<blockquote>
  <p>Non static member reference must be relative to a specific object</p>
</blockquote>

<pre class="lang-cpp prettyprint-override"><code>VirtualDesktopManager mVirtualDeskManager;
mVirtualDesktopManager.IsWindowOnCurrentVirtualDesktop(/args...*/)
</code></pre>

<p>Throws this error:</p>

<blockquote>
  <p>Incomplete type is not allowed</p>
</blockquote>

<p>I have only found solutions on using the <code>IVirtualDesktopManager</code> interface in C# yet.</p>