Uses for Setting a Window on a Memory Screen
There are several reasons you might want to use a memory screen other than the video screen as the destination for one or more windows. Some possibilities are as follows:
- nFormat printing by combining several windows on one memory screen and then printing the larger memory screen.
- nIsolate a window's image for printing or print a window image that is larger than the screen.
- nSet one window's image within another window's buffer. This will combine the windows and will make the first window scroll with the other data in the second window's buffer. (This is how memo field windows are placed on a form window.)
- nWrite to a specific area of a memory screen. Virtual windows write to the whole memory screen using the memory screen coordinate system. A window whose destination is a memory screen writes only to the area of the memory screen covered by the window.
- nPrepare a screen for later display. If you have several windows that you want to display all at once on the video screen (instead of setting them one by one on the video screen), define a window the size of the physical screen and set the desired windows on its buffer. Then set the screen-sized window on the video screen. Since it becomes FULL_WNP's top child when it is set, it replaces the whole screen with the new window in one stroke. Then use sw_dest() to restore each window's destination pointer to VID_SCRP, so that subsequent output behaves normally.
More:
Using the Destination for Formatting Text for Printing with Windows
Using the Destination for Isolating the Window for Printing
Using the Destination to Combine Windows
Writing to Specific Areas of a Memory Screen