WinCopyRect
Appearance
This function copies a rectangle from prclSrc to prclDst.
Syntax
WinCopyRect(hab, prclDst, prclSrc)
Parameters
- hab (HAB) - input
- Anchor-block handle.
- prclDst (PRECTL) - output
- Destination rectangle.
- Note: The value of each field in this structure must be in the range -32 768 through 32 767. The data type WRECT can also be used, if supported by the language.
- prclSrc (PRECTL) - input
- Source rectangle.
- Note: The value of each field in this structure must be in the range -32 768 through 32 767. The data type WRECT can also be used, if supported by the language.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Example Code
This example copies a rectangle using WinCopyRect.
#define INCL_WINRECTANGLES /* Window Rectangle Functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HAB hab; /* anchor-block handle */ RECTL prclRect2 = {0,0,200,200}; /* source rectangle */ RECTL prclRect1; /* destination rectangle */ fSuccess = WinCopyRect(hab, &prclRect1, &prclRect2);
Definition
#define INCL_WINRECTANGLES /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ PRECTL prclDst; /* Destination rectangle. */ PRECTL prclSrc; /* Source rectangle. */ BOOL rc; /* Success indicator. */ rc = WinCopyRect(hab, prclDst, prclSrc);