3.2.2 Window Painting and Updating

The grabber receives requests to paint or update the window of a non-Windows application whenever a change in the video context of the corresponding VM occurs, such as when the application writes to the screen or the user changes the size of the window.

If a non-Windows application writes to the screen, the virtual-display device sends WINOLDAP a screen update message and WINOLDAP calls the UpdateScreen functions in the grabber to update the window. The grabber calls the virtual-display device to retrieve the current contents of the VM screen, then places the contents in the application's window.

If a user resizes a window containing a non-Windows application, Windows sends WINOLDAP a paint message, and WINOLDAP calls the PaintScreen function in the grabber to paint the window. Again, the grabber calls the virtual-display device to retrieve the screen contents, and places the contents in the window.