Share via


CDC::GradientFill

Call this member function to fill rectangle and triangle structures with color that smoothly fades from one side to the other.

BOOL GradientFill( 
   TRIVERTEX* pVertices, 
   ULONG nVertices, 
   void* pMesh, 
   ULONG nMeshElements, 
   DWORD dwMode  
);

Parameters

  • pVertices
    Pointer to an array of TRIVERTEX structures that each define a triangle vertex.

  • nVertices
    The number of vertices.

  • pMesh
    Array of GRADIENT_TRIANGLE structures in triangle mode, or an array of GRADIENT_RECT structures in rectangle mode.

  • nMeshElements
    The number of elements (triangles or rectangles) in pMesh.

  • dwMode
    Specifies gradient fill mode. For a list of possible values, see GradientFill in the Windows SDK.

Return Value

TRUE if successful; otherwise FALSE.

Remarks

For more information, see GradientFill in the Windows SDK.

Requirements

Header: afxwin.h

See Also

Reference

CDC Class

Hierarchy Chart

EMRGRADIENTFILL