Jump to content

WinMakeRect

From EDM2

This function converts a rectangle to a graphics rectangle.

Syntax

 WinMakeRect(hab, pwrc)

Parameters

hab (HAB) - Input
Anchor-block handle.
pwrc (PRECTL) - In/Out
Rectangle to be converted.
The data type of the rectangle after conversion is RECTL.

Returns

rc (BOOL) - returns
Success indicator.
TRUE
Successful completion
FALSE
Error occurred.

Remarks

This function converts a rectangle from a WRECT data structure into a RECTL data structure.

Example Code

#define INCL_WINRECTANGLES /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HAB      hab;       /*  Anchor-block handle. */
PRECTL  pwrc;      /*  Rectangle to be converted. */
BOOL     rc;       /*  Success indicator. */

rc = WinMakeRect(hab, pwrc);

This example calls WinMakeRect to convert a window rectangle (WRECT structure) to a graphics rectangle (RECTL structure).

#define INCL_WINRECTANGLES      /* Window Rectangle Functions   */
#include <os2.h>

HAB     hab;            /* anchor-block handle                  */
BOOL  fSuccess;         /* success indicator                    */
/* window rectangle */
WRECT  pwrcprc = {0,0,50,50};
RECTL prclprc;

/* convert rectangle */
fSuccess = WinMakeRect(hab, &prclprc);

Related Functions