Jump to content

BKM CALCPAGERECT

From EDM2

This message calculates an application page rectangle from a notebook rectangle or calculates a notebook rectangle from an application page rectangle, depending on the setting of the bPage parameter.

Syntax

param1
PRECTL pRectl; /* Pointer to the RECTL structure that contains the coordinates of the rectangle. */

param2
BOOL bPage;    /* Window specifier. */

Parameters

pRectl (PRECTL) - Input/Output
Pointer to the RECTL structure that contains the coordinates of the rectangle.
If bPage is TRUE, this structure contains the coordinates of a notebook window on input, and on return it contains the coordinates of an application page window.
If bPage is FALSE, this structure contains the coordinates of an application page window on input, and on return it contains the coordinates of a notebook window.
bPage (BOOL) - Input
Specifies whether the window coordinates to calculate are for a notebook window or an application page window:
TRUE: An application page window is calculated.
FALSE: A notebook window is calculated.

Returns

rc (BOOL) - returns
Success indicator:
TRUE: Coordinates were successfully calculated.
FALSE: Unable to calculate coordinates. This is returned if an invalid RECTL structure is specified in the pRectl parameter.

Remarks

The application can use this message to determine the size of either the notebook window or the application page window. It can also be used when the application handles the position and size of the application page window.

To calculate the application page rectangle, specify the coordinates of the notebook window in the pRectl parameter and TRUE in the bPage parameter. The notebook control then uses the coordinates specified in the pRectl parameter to calculate and return the coordinates of the application page window.

To calculate the notebook rectangle, specify the coordinates of the application page window in the pRectl parameter and FALSE in the bPage parameter. The notebook control then uses the coordinates specified in the pRectl parameter to calculate and return the coordinates of the notebook window.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it other than to return FALSE.