To change the destination of a window, use the set window destination function, sw_dest(),
|
||
|
|
|
|
|
|
For scrp, specify a pointer to a memory screen, or use VID_SCRP to set the destination of the window to be the screen.
sw_dest() sets a window's destination to a Vermont Views memory screen. It also sets the destination of all children of that window to the new destination, and the same with their children, etc.
Caution: When you use sw_dest(), the row begin and column begin coordinates in the window structure are used to place the window relative to its destination memory screen. If the window's coordinates do not lie entirely within the new destination, writing to the window may produce a serious memory overwrite. This can easily happen if the user has resized or dragged the window. If this is a consideration in your application, you can call wn_mod() after setting the window's destination to adjust its coordinates to lie entirely within the new destination.