GetPaintDC

Description

Returns the GDI context to which to draw.

Syntax

GetPaintDC ( )

Returns

UnsignedLong.

Usage

The clip region of the GDI context is guaranteed to be the same as the rectangle defined by GetPaintRectHeight, GetPaintRectWidth, GetPaintRectX, and GetPaintRectY.

You can also use the GetClipBox GDI function. You can compute the bounds inside the global rendering function itself.

The GetPaintDC expression is only valid in the context of the Paint expression function.

Examples

Example 1

This example draws a cube with the text of the column emp_lname.

Paint

(

     MyDrawWPFCubeText

     (

          GetPaintDC(),

          GetPaintRectX(),

          GetPaintRectY(),

          GetPaintRectWidth(),

          GetPaintRectHeight(),

          emp_lname,

          GetRow()

     )

)

See also