BeginPath function (wingdi.h)
The BeginPath function opens a path bracket in the specified device context.
BOOL BeginPath(
[in] HDC hdc
);
[in] hdc
A handle to the device context.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
After a path bracket is open, an application can begin calling GDI drawing functions to define the points that lie in the path. An application can close an open path bracket by calling the EndPath function.
When an application calls BeginPath for a device context, any previous paths are discarded from that device context. The following list shows which drawing functions can be used.
- AngleArc
- Arc
- ArcTo
- Chord
- CloseFigure
- Ellipse
- ExtTextOut
- LineTo
- MoveToEx
- Pie
- PolyBezier
- PolyBezierTo
- PolyDraw
- Polygon
- Polyline
- PolylineTo
- PolyPolygon
- PolyPolyline
- Rectangle
- RoundRect
- TextOut
For an example, see Using Paths.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |