You are not limited to having one window associated with one memory screen. You can use a memory screen as a buffer for many windows. Some reasons you might want more than one virtual window associated with a memory screen are:
Designer: To create multiple windows with the same memory screen buffer:
| 1 | Create several windows with the Designer. |
| 2 | In your code, open the Designer library, read the windows from the library, and follow Steps 2 through 4 below. |
Code:
| 1 | Define several windows. Use wn_vdef() to create one window with the buffer. Use wn_nbdef() to create the other windows with no buffer. |
| 2 | Get a pointer to the memory screen by using the function wn_msbuf() on the window defined with wn_vdef(). |
| 3 | Associate the memory screen with the other windows by calling sw_msbuf() for each window to be associated with the memory screen.msp = wn_msbuf(first_wnp); |
| 4 | Set the memory screen origin in each window to the area of the memory file that you initially want to see in the window. |
General: Besides viewing, you can also use each of the windows to write to the memory screen. When doing this, you should consider the following: