BeginPath function (wingdi.h)

The BeginPath function opens a path bracket in the specified device context.

Syntax

BOOL BeginPath(
  [in] HDC hdc
);

Parameters

[in] hdc

A handle to the device context.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

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.

Examples

For an example, see Using Paths.

Requirements

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

See also

EndPath

FillPath

Path Functions

PathToRegion

Paths Overview

SelectClipPath

StrokeAndFillPath

StrokePath

WidenPath