i want to create a virtual monitor. The way this would work is that the virtual monitor would appear in a window on my desktop. As far as Windows knows it is just anoth
Don't know about Windows, but for X (Linux) there is Xvfb (X Virtual Frame Buffer), which is quite a useful thing.
I'd say it's definitely possible, since that's what virtualization tools do for their guest utilities, but I wouldn't be able to tell you how in details. I'd suggest looking at the VirtualBox guest driver code as a starting point: http://www.virtualbox.org/browser/trunk/src/VBox/Additions/WINNT/Graphics
(This is released under GPL as far as I'm aware.)
It's definitely possible, see for example the UltraVNC mirror driver. But I don't know of any virtual video driver that makes source code available.
I have been searching for something similar and I found a nice solution: spacedesk. You can download it here: http://spacedesk.ph/ In windows, it installs an extra monitor, which you can open in a browser or a viewer. Enjoy!