• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

4.8. Painting

Painting is the standard mechanism that the operating system uses to inform a control that it is time to draw. With the exception of class Canvas (see the section Class Canvas), whose function is to be a general-purpose “drawing area,” controls are responsible for drawing themselves. This means that this section is mostly of interest to those programmers who are implementing their own controls or using canvases to draw arbitrary graphics.

4.8.1. Deferred Update Strategy

When it is time to draw a control, the windowing system issues one or more paint events for the control. Paint events are generated for a variety of reasons. For example, when a shell comes forward, replacing the topmost shell, areas within the shell that were obscured by the previous topmost shell need to be drawn. Similarly, when a control is moved, resized, or hidden, other controls within the shell can be uncovered or exposed and need to be drawn.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint