Jump to content

WinMakePoints

From EDM2
Revision as of 14:24, 9 April 2025 by Martini (talk | contribs) (Created page with "This function converts points to graphics points. ==Syntax==  WinMakePoints(hab, pwpt, cwpt) ==Parameters== ;hab (HAB) - Input : Anchor-block handle. ;pwpt (PPOINTL) - In/Out : Points to be converted. : The data type of these points after conversion is POINTL. ;cwpt (ULONG) - Input : Number of points to be converted. : Must be positive. ==Returns== ;rc (BOOL) - returns :Success indicator. :;TRUE ::Successful completion :;FALSE ::Error occurred. =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function converts points to graphics points.

Syntax

 WinMakePoints(hab, pwpt, cwpt)

Parameters

hab (HAB) - Input
Anchor-block handle.
pwpt (PPOINTL) - In/Out
Points to be converted.
The data type of these points after conversion is POINTL.
cwpt (ULONG) - Input
Number of points to be converted.
Must be positive.

Returns

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

Remarks

This function converts the array of points from a WPOINT data structure into a POINTL data structure.

Example Code

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

HAB      hab;        /*  Anchor-block handle. */
PPOINTL  pwpt;      /*  Points to be converted. */
ULONG    cwpt;      /*  Number of points to be converted. */
BOOL     rc;        /*  Success indicator. */

rc = WinMakePoints(hab, pwpt, cwpt);

This example calls WinMakePoints to convert a 3-element array of points from window points (WPOINT structure) to graphics points (POINTL structure).

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

HAB     hab;            /* anchor-block handle                  */
BOOL  fSuccess;         /* success indicator                    */
/* array of window points */
WPOINT pwptppt[3] = {{0,0},{20,0},{50,0}};
POINTL pptlppt[3];

/* convert points */
fSuccess = WinMakePoints(hab, pptlppt, 3);