Adding shadows to a window gives depth to the flat video display. Shadows are useful for giving the user an indication of what window is the active or top window when several windows are on the screen at once. Figure 25.2 shows a window with a shadow.

Figure 25.2: Example of a Window with Shadows
Designer: You can add shadows to your windows with the Designer. You can also add shadows to Designer windows in your code, by calling the functions described below.
Code: To add shadows to a window, call the set window shadow function sw_shad():
|
||
|
|
|
|
|
|
|
|
|
|
|
|
For fill_ch, you can specify to create transparent shadows. Transparent shadows allow characters covered by the shadow to show through by changing their attribute. Otherwise, specify the character you want to use to draw the shadows.
Under PCDOS, you can use the graphics blocks to achieve different effects. The following characters are defined for your convenience:
CH_LIGHTSHADECH_RTBLOCK |
For att, specify the color that you want to make the shadows. The logical attribute LSHADOW has been pre-defined to use for shadows.
For location, specify the two sides that you want the shadows to appear, either:
|
The call that created the shadow in Figure 25.2 is as follows:
|
Displaying and Removing Shadows from the Screen
Removing Shadows from a Window