diff --git a/contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java b/contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java index 4d72ba89dc..0ce46115d7 100644 --- a/contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java @@ -129,20 +129,20 @@ public String encodePaths(String[] paths) { * Appbar message value to send. This parameter can be one of the following * values. */ - DWORD ABM_NEW = new DWORD(0x00000000); + int ABM_NEW = 0x00000000; /** * Registers a new appbar and specifies the message identifier that the * system should use to send notification messages to the appbar. */ - DWORD ABM_REMOVE = new DWORD(0x00000001); + int ABM_REMOVE = 0x00000001; /** Unregisters an appbar, removing the bar from the system's internal list.*/ - DWORD ABM_QUERYPOS = new DWORD(0x00000002); + int ABM_QUERYPOS = 0x00000002; /** Requests a size and screen position for an appbar. */ - DWORD ABM_SETPOS = new DWORD(0x00000003); + int ABM_SETPOS = 0x00000003; /** Sets the size and screen position of an appbar. */ - DWORD ABM_GETSTATE = new DWORD(0x00000004); + int ABM_GETSTATE = 0x00000004; /** Retrieves the autohide and always-on-top states of the Windows taskbar. */ - DWORD ABM_GETTASKBARPOS = new DWORD(0x00000005); + int ABM_GETTASKBARPOS = 0x00000005; /** * Retrieves the bounding rectangle of the Windows taskbar. Note that this * applies only to the system taskbar. Other objects, particularly toolbars @@ -152,22 +152,22 @@ public String encodePaths(String[] paths) { * both the taskbar and other app barsÑthe working area available to your * applicationÑ, use the GetMonitorInfo function. */ - DWORD ABM_ACTIVATE = new DWORD(0x00000006); + int ABM_ACTIVATE = 0x00000006; /** * Notifies the system to activate or deactivate an appbar. The lParam * member of the APPBARDATA pointed to by pData is set to TRUE to activate * or FALSE to deactivate. */ - DWORD ABM_GETAUTOHIDEBAR = new DWORD(0x00000007); + int ABM_GETAUTOHIDEBAR = 0x00000007; /** * Retrieves the handle to the autohide appbar associated with a particular * edge of the screen. */ - DWORD ABM_SETAUTOHIDEBAR = new DWORD(0x00000008); + int ABM_SETAUTOHIDEBAR = 0x00000008; /** Registers or unregisters an autohide appbar for an edge of the screen. */ - DWORD ABM_WINDOWPOSCHANGED = new DWORD(0x00000009); + int ABM_WINDOWPOSCHANGED = 0x00000009; /** Notifies the system when an appbar's position has changed. */ - DWORD ABM_SETSTATE = new DWORD(0x0000000A); + int ABM_SETSTATE = 0x0000000A; /** Left edge. */ int ABE_LEFT = 0; diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Shell32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Shell32Test.java index b3d8e8aee7..e5e1d707e7 100644 --- a/contrib/platform/test/com/sun/jna/platform/win32/Shell32Test.java +++ b/contrib/platform/test/com/sun/jna/platform/win32/Shell32Test.java @@ -63,20 +63,20 @@ private void newAppBar() { data.cbSize.setValue(data.size()); data.uCallbackMessage.setValue(WM_USER + 1); - UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_NEW, data); + UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_NEW), data); assertNotNull(result); } private void removeAppBar() { APPBARDATA data = new APPBARDATA.ByReference(); data.cbSize.setValue(data.size()); - UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_REMOVE, data); + UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_REMOVE), data); assertNotNull(result); } private void queryPos(APPBARDATA data) { - UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_QUERYPOS, data); + UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_QUERYPOS), data); assertNotNull(h); assertTrue(h.intValue() > 0); @@ -97,7 +97,7 @@ public void testResizeDesktopFromBottom() throws InterruptedException { queryPos(data); - UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_SETPOS, data); + UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_SETPOS), data); assertNotNull(h); assertTrue(h.intValue() >= 0); @@ -118,7 +118,7 @@ public void testResizeDesktopFromTop() throws InterruptedException { queryPos(data); - UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_SETPOS, data); + UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_SETPOS), data); assertNotNull(h); assertTrue(h.intValue() >= 0);