CTerminalEmulator::ConvertPos Method  
 
BOOL ConvertPos(
  INT nMethod,  
  INT xPos,  
  INT yPos,  
  LPPOINT lppt  
);
BOOL ConvertPos(
  INT xPos,  
  INT yPos,  
  LPPOINT lppt  
);

The ConvertPos method converts the specified X,Y position and stores the result in the POINT structure provided by the caller.

Parameters

nMethod
An integer value which specifies the conversion method to use. This may be one of the following values:
Constant Description
NVT_CURSOR_TO_PIXELS Convert cursor X,Y coordinates to the current window X,Y pixel coordinates. An error is returned if the coordinates are out of bounds for the current display.
NVT_PIXELS_TO_CURSOR Convert window X,Y pixel coordinates to cursor X,Y coordinates. If the point is outside of the bounds of the display, it is normalized to account for mouse capture.
xPos
An integer value which specifies the X position in the virtual display. This may either be the cursor position or a pixel position, based on the value of the nMethod parameter.
yPos
An integer value which specifies the Y position in the virtual display. This may either be the cursor position or a pixel position, based on the value of the nMethod parameter.
lppt
A pointer to a POINT structure which will contain the converted coordinates.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, it returns zero.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csnvtv10.lib

See Also

GetCursorPos, GetCellSize, GetScrollPos, GetSize, SetCursorPos, SetScrollPos