DocInfoXY (Function) In french: DocInfoXY For a given position in a Word Processing control (coordinates of a control point), returns one of the following: - the number of the corresponding page,
- the corresponding X-position (in mm),
- the corresponding Y-position (in mm).
// Page number nPage is int nPage = DocInfoXY(WP_MyDocument, docPageNumber, MouseXPos(), MouseYPos()) Trace("Page number: ", nPage) // X position rXPos is real rXPos = DocInfoXY(WP_MyDocument, docXCoord, MouseXPos(), MouseYPos()) Trace("X position in mm: ", rXPos) // Y position rYPos is real rYPos = DocInfoXY(WP_MyDocument, docYCoord, MouseXPos(), MouseYPos()) Trace("Y position in mm: ", rYPos)
Syntax
<Result> = DocInfoXY(<Word Processing control> , <Type of information> , <X> , <Y>)
<Result>: Real Requested information. <Word Processing control>: Control name Name of the Word Processing control to use.
If this parameter corresponds to an empty string (""), the control to which the current event belongs will be used. <Type of information>: Integer constant Requested type of information: | | docOriginScreen | By default, (0,0) corresponds to row 1, column 1 of the Word Processing control (scrollbars located at the origin). If the docOriginScreen constant is combined with the previous constants, (0,0) corresponds to the origin of the screen. This constant cannot be used on its own. | docPageNumber | Number of the page that contains the specified position. | docXCoord | X-coordinate of the specified position on the page (expressed in millimetres). | docYCoord | Y-coordinate of the specified position on the page (expressed in millimetres). |
<X>: Integer X-coordinate (in pixels) to be analyzed. This coordinate is relative to the control (if the docOriginScreen constant is not specified). <Y>: Integer Y-coordinate (in pixels) to be analyzed. This coordinate is relative to the control (if the docOriginScreen constant is not specified). Business / UI classification: Business Logic
This page is also available for…
|
|
|
|