Creating a Graphics Object

The Windows Foundation Classes (WFC) provide several ways in which to create a Graphics object.

  • Explicit object creation. You can create a Graphics object explicitly by calling the createGraphics method on any object that extends the Control class.

  • Implicit object creation. The Bitmap and Metafile objects support implicit Graphics object creation through a getGraphics method.