From d08715717c3d5cb4d9889b3ac92d5f6860fc6fc1 Mon Sep 17 00:00:00 2001 From: Carolyn MacLeod Date: Thu, 10 May 2012 16:08:19 -0400 Subject: Bug 44072 - API Request: Combo#getCaretLocation() --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java index a9b2394616..f834d75c52 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java @@ -714,7 +714,11 @@ public Point getCaretLocation () { OS.SendMessage (hwndText, OS.EM_SETSEL, start [0], end [0]); } } - return new Point (OS.GET_X_LPARAM (caretPos), OS.GET_Y_LPARAM (caretPos)); + POINT point = new POINT (); + point.x = OS.GET_X_LPARAM (caretPos); + point.y = OS.GET_Y_LPARAM (caretPos); + OS.MapWindowPoints (hwndText, handle, point, 1); + return new Point (point.x, point.y); } /** -- cgit