diff options
author | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-05-10 16:08:19 -0400 |
---|---|---|
committer | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-05-10 16:11:45 -0400 |
commit | d08715717c3d5cb4d9889b3ac92d5f6860fc6fc1 (patch) | |
tree | 267855216b2ad8894670251185da0bc71f3ac575 /bundles | |
parent | 68e03471d13fd16f26e5d37890119f05f1c0b292 (diff) | |
download | eclipse.platform.swt-d08715717c3d5cb4d9889b3ac92d5f6860fc6fc1.tar.gz eclipse.platform.swt-d08715717c3d5cb4d9889b3ac92d5f6860fc6fc1.tar.xz eclipse.platform.swt-d08715717c3d5cb4d9889b3ac92d5f6860fc6fc1.zip |
Bug 44072 - API Request: Combo#getCaretLocation()
Diffstat (limited to 'bundles')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java | 6 |
1 files changed, 5 insertions, 1 deletions
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); } /** |