GreGetCurrentPosition: Difference between revisions
Appearance
Created page with "GreGetCurrentPosition takes the current (X,Y) position in world coordinates from the DC instance data structure and stores it at the location addressed by pptlPosition. If COM..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreGetCurrentPosition takes the current (X,Y) position in world coordinates from the DC instance data structure and stores it at the location addressed by pptlPosition. If COM_TRANSFORM is not set, the current position is returned in screen coordinates. | GreGetCurrentPosition takes the current (X,Y) position in world coordinates from the DC instance data structure and stores it at the location addressed by pptlPosition. If COM_TRANSFORM is not set, the current position is returned in screen coordinates. | ||
This function must be supported by all presentation drivers. GreGetCurrentPosition is called by the GpiQueryCurrentPosition function. GreGetCurrentPosition might also be called in response to any of the Presentation Manager drawing functions that begin their operation from the current position within the presentation space. | This function must be supported by all presentation drivers. GreGetCurrentPosition is called by the [[GpiQueryCurrentPosition]] function. GreGetCurrentPosition might also be called in response to any of the Presentation Manager drawing functions that begin their operation from the current position within the presentation space. | ||
;Simulation support: None. This function is mandatory for all drivers. | ;Simulation support: None. This function is mandatory for all drivers. | ||
== Syntax == | == Syntax == | ||
GreGetCurrentPosition(hdc, pptlPosition, pInstance, lFunction) | GreGetCurrentPosition(hdc, pptlPosition, pInstance, lFunction) | ||
== Parameters == | == Parameters == | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;pptlPosition (P[[POINTL]]) - input:Pointer to current position. | ||
;pInstance (PVOID) - input:Pointer to instance data. | |||
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreGetCurrentPosition. | |||
== Returns == | == Returns == | ||
;rc (BOOL) - returns | ;rc (BOOL) - returns:Return Code. | ||
:Return Code. | :On completion, the handling routine must return a BOOLEAN value to indicate success or an error. | ||
:*TRUE Successful | |||
:On completion, the handling routine must return a BOOLEAN value to indicate success or an error. | :*FALSE Error | ||
:Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | |||
:*TRUE Successful | :*PMERR_DEV_FUNC_NOT_INSTALLED | ||
:*FALSE Error | :*PMERR_INV_HDC | ||
:Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation. | |||
:Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | |||
:*PMERR_DEV_FUNC_NOT_INSTALLED | |||
:*PMERR_INV_HDC | |||
:Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation. | |||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 12:17, 20 January 2020
GreGetCurrentPosition takes the current (X,Y) position in world coordinates from the DC instance data structure and stores it at the location addressed by pptlPosition. If COM_TRANSFORM is not set, the current position is returned in screen coordinates.
This function must be supported by all presentation drivers. GreGetCurrentPosition is called by the GpiQueryCurrentPosition function. GreGetCurrentPosition might also be called in response to any of the Presentation Manager drawing functions that begin their operation from the current position within the presentation space.
- Simulation support
- None. This function is mandatory for all drivers.
Syntax
GreGetCurrentPosition(hdc, pptlPosition, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- pptlPosition (PPOINTL) - input
- Pointer to current position.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreGetCurrentPosition.
Returns
- rc (BOOL) - returns
- Return Code.
- On completion, the handling routine must return a BOOLEAN value to indicate success or an error.
- TRUE Successful
- FALSE Error
- Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
- PMERR_DEV_FUNC_NOT_INSTALLED
- PMERR_INV_HDC
- Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.