VDM is written in C++ and is a Win32 API application (non-MFC). It uses a simple Algorithm: when switching to a new desktop, handles to all the windows on the current desktop are saved to a list and hidden. Next, the windows on the destination desktop are shown. VDM does not need to track the creation and destruction of windows--the "current" desktop's list isn't created until you switch away from it. To hide windows, VDM calls the Win32 API function ShowWindow with the SW_HIDE parameter (primary method) or uses SetParent to set the window's parent to a hidden window owned by VDM (alternate method, selected with the -a command-line parameter). Some programs seem to agree more with one method than with the other--try both, and see what works best for you.
To use Virtual Desktop manager (VDM): Simply run VDM.EXE. (No installation is needed.) Four numbered icons will appear in the tray. #1 will be highlighted, indicating that desktop 1 is active. (You can specify an alternate number of virtual desktops on the command line--See the "Command-line options" section.) All windows open when the program loads start in desktop 1. To switch desktops: Left-click an icon to switch to the corresponding desktop. Alternatively, press Ctrl+Alt+1..9 to switch to desktop 1..9. To move the Active Window to another desktop: Right-click an icon to move the active window to the corresponding desktop. Alternatively, press Ctrl+Shift+1..9 to move the active window to desktop 1..9. To Exit VDM: Double-click any tray icon to bring up the "About" box, which has an "Exit" button. Alternatively, press Ctrl+Alt+0 to exit VDM. When you exit, all windows on all virtual desktops will be placed on the physical desktop.