diff options
author | Silenio Quarti <silenio> | 2007-06-26 19:52:07 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2007-06-26 19:52:07 +0000 |
commit | dde9991d8ece5d41693dc005023b2dc541580423 (patch) | |
tree | 22208020450b18617b577876a467b86f2f89cf74 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java | |
parent | 32c3ac1c7d3632328e114c269edb06639a7dab76 (diff) | |
download | eclipse.platform.swt-dde9991d8ece5d41693dc005023b2dc541580423.tar.gz eclipse.platform.swt-dde9991d8ece5d41693dc005023b2dc541580423.tar.xz eclipse.platform.swt-dde9991d8ece5d41693dc005023b2dc541580423.zip |
use macros for lParam and wParam
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java index e14153e6c1..ba79d579b3 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java @@ -209,8 +209,8 @@ void _setVisible (boolean visible) { int nX = x, nY = y; if (!hasLocation) { int pos = OS.GetMessagePos (); - nX = (short) (pos & 0xFFFF); - nY = (short) (pos >> 16); + nX = OS.GET_X_LPARAM (pos); + nY = OS.GET_Y_LPARAM (pos); } /* * Feature in Windows. It is legal use TrackPopupMenu() @@ -220,14 +220,14 @@ void _setVisible (boolean visible) { * that the menu has been closed. This is not strictly a * bug but leads to unwanted behavior when application code * assumes that every WM_INITPOPUPMENU will eventually result - * in a WM_MENUSELECT, wParam=0xFFFF0000, lParam=0 to indicate - * that the menu has been closed. The fix is to detect the - * case when TrackPopupMenu() fails and the number of items in + * in a WM_MENUSELECT, wParam=MAKEWPARAM (0, 0xFFFF), lParam=0 to + * indicate that the menu has been closed. The fix is to detect + * the case when TrackPopupMenu() fails and the number of items in * the menu is zero and issue a fake WM_MENUSELECT. */ boolean success = OS.TrackPopupMenu (handle, flags, nX, nY, 0, hwndParent, null); if (!success && GetMenuItemCount (handle) == 0) { - OS.SendMessage (hwndParent, OS.WM_MENUSELECT, 0xFFFF0000, 0); + OS.SendMessage (hwndParent, OS.WM_MENUSELECT, OS.MAKEWPARAM (0, 0xFFFF), 0); } } else { OS.SendMessage (hwndParent, OS.WM_CANCELMODE, 0, 0); @@ -396,7 +396,7 @@ void createHandle () { * a result, Shell on WinCE SP must use the class Dialog. */ int dwMask = OS.SHMBOF_NODEFAULT | OS.SHMBOF_NOTIFY; - int lParam = dwMask << 16 | dwMask; + int lParam = OS.MAKELPARAM (dwMask, dwMask); OS.SendMessage (hwndCB, OS.SHCMBM_OVERRIDEKEY, OS.VK_ESCAPE, lParam); return; } |