Type | Description | |||
Long | A long expression that indicates the x-coordinate of the control's caret, in pixels relative to the control's client area. |
The following VB sample converts the caret client coordinates to screen coordinates:
Private Type POINTAPI x As Long y As Long End Type Private Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long Private Function client2screen(ByVal e As EXEDITLibCtl.Edit, ByVal xClient As Long, ByVal yClient As Long) As POINTAPI Dim p As POINTAPI With e p.x = xClient p.y = yClient ClientToScreen .hWndPane(.FocusPane), p End With client2screen = p End Function
The following C++ sample converts client coordinates to screen coordinates:
POINT ptCursor = { m_edit.GetCaretPosX(), m_edit.GetCaretPosY() }; m_edit.ClientToScreen( &ptCursor );
The following VB.NET sample converts client coordinates to screen coordinates:
With AxEdit1 Dim ptCursor As Point = New Point(.CaretPosX, .CaretPosY) ptCursor = .PointToScreen(ptCursor) End With
The following C# sample converts client coordinates to screen coordinates:
Point ptCursor = new Point( axEdit1.CaretPosX, axEdit1.CaretPosY ); ptCursor = axEdit1.PointToScreen(ptCursor);
The following VFP sample converts client coordinates to screen coordinates:
DECLARE integer ClientToScreen IN WIN32API as "ClientToScreen" integer hWnd,string @lpPoint with thisform.Edit1.Object local ptCursor ptCursor = Replicate(Chr(0),8) ClientToScreen( .hWnd, @ptCursor ) endwith