Export (0) Print
Expand All

CopyRect function

The CopyRect function copies the coordinates of one rectangle to another.

Syntax


BOOL CopyRect(
  _Out_  LPRECT lprcDst,
  _In_   const RECT *lprcSrc
);

Parameters

lprcDst [out]

Pointer to the RECT structure that receives the logical coordinates of the source rectangle.

lprcSrc [in]

Pointer to the RECT structure whose coordinates are to be copied in logical units.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

Because applications can use rectangles for different purposes, the rectangle functions do not use an explicit unit of measure. Instead, all rectangle coordinates and dimensions are given in signed, logical values. The mapping mode and the function in which the rectangle is used determine the units of measure.

Examples

For an example, see Using Rectangles.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Rectangles Overview
Rectangle Functions
RECT
SetRect
SetRectEmpty

 

 

Community Additions

ADD
Show:
© 2014 Microsoft