Share via


CDC::DrawEdge

BOOL DrawEdge( LPRECT lpRect**, UINT** nEdge**, UINT** nFlags );

Return Value

Nonzero if successful; otherwise 0.

Parameters

lpRect

A pointer to a RECT structure that contains the logical coordinates of the rectangle.

nEdge

Specifies the type of inner and outer edge to draw. This parameter must be a combination of one inner-border flag and one outer-border flag. See the Remarks section for a table of the parameter’s types.

nFlags

The flags that specify the type of border to be drawn. See the Remarks section for a table of the parameter’s values:

Remarks

Call this member function to draw the edges of a rectangle of the specified type and style.

The inner and outer border flags are as follows:

  • Inner-border flags
    • BDR_RAISEDINNER   Raised inner edge.

    • BDR_SUNKENINNER   Sunken inner edge.

  • Outer-border flags
    • BDR_RAISEDOUTER   Raised outer edge.

    • BDR_SUNKENOUTER   Sunken outer edge.

The nEdge parameter must be a combination of one inner and one outer border flag. The nEdge parameter can specify one of the following flags:

  • EDGE_BUMP   Combination of BDR_RAISEDOUTER and BDR_SUNKENINNER.

  • EDGE_ETCHED   Combination of BDR_SUNKENOUTER and BDR_RAISEDINNER.

  • EDGE_RAISED   Combination of BDR_RAISEDOUTER and BDR_RAISEDINNER.

  • EDGE_SUNKEN   Combination of BDR_SUNKENOUTER and BDR_SUNKENINNER.

The nFlags parameter types are as follows:

  • BF_RECT   Entire border rectangle.

  • BF_LEFT   Left side of border rectangle.

  • BF_BOTTOM   Bottom of border rectangle.

  • BF_RIGHT   Right side of border rectangle.

  • BF_TOP   Top of border rectangle.

  • BF_TOPLEFT   Top and left side of border rectangle.

  • BF_TOPRIGHT   Top and right side of border rectangle.

  • BF_BOTTOMLEFT   Bottom and left side of border rectangle.

  • BF_BOTTOMRIGHT   Bottom and right side of border rectangle.

For diagonal lines, the BF_RECT flags specify the end point of the vector bounded by the rectangle parameter.

  • BF_DIAGONAL_ENDBOTTOMLEFT   Diagonal border. The end point is the bottom-left corner of the rectangle; the origin is top-right corner.

  • BF_DIAGONAL_ENDBOTTOMRIGHT   Diagonal border. The end point is the bottom-right corner of the rectangle; the origin is top-left corner.

  • BF_DIAGONAL_ENDTOPLEFT   Diagonal border. The end point is the top-left corner of the rectangle; the origin is bottom-right corner.

  • BF_DIAGONAL_ENDTOPRIGHT   Diagonal border. The end point is the top-right corner of the rectangle; the origin is bottom-left corner.

For more information about the Windows API DrawEdge, see in the Win32 SDK Programmer’s Reference.

CDC OverviewClass MembersHierarchy Chart

See Also