IVirtualDesktopManager interface (shobjidl_core.h)
Exposes methods that enable an application to interact with groups of windows that form virtual workspaces. This interface is implemented by VirtualDesktopManager, a COM class identified by CLSID_VirtualDesktopManager. Use CoCreateInstance(CLSID_VirtualDesktopManager) to get an instance of this object.
Inheritance
The IVirtualDesktopManager interface inherits from the IUnknown interface. IVirtualDesktopManager also has these types of members:
Methods
The IVirtualDesktopManager interface has these methods.
IVirtualDesktopManager::GetWindowDesktopId Gets the identifier for the virtual desktop hosting the provided top-level window. |
IVirtualDesktopManager::IsWindowOnCurrentVirtualDesktop Indicates whether the provided window is on the currently active virtual desktop. |
IVirtualDesktopManager::MoveWindowToDesktop Moves a window to the specified virtual desktop. |
Remarks
The user can group a collection of windows together to create a virtual desktop. Every window is considered to be part of a virtual desktop. When one virtual desktop is hidden, all of the windows associated with it are also hidden. This enables the user to create multiple working environments and to be able to switch between them. Similarly, when a virtual desktop is selected to be active, the windows associated with that virtual desktop are displayed on the screen.
To support this concept, applications should avoid automatically switching the user from one virtual desktop to another. Only the user should instigate that change. In order to support this, newly created windows should appear on the currently active virtual desktop. In addition, if an application can reuse currently active windows, it should only reuse windows if they are on the currently active virtual desktop. Otherwise, a new window should be created.
![Virtual desktop visualization](images/virtualdesktops.png)
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 [desktop apps only] |
Minimum supported server | Windows Server 2016 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h |