3 messages in net.java.dev.jna.usersRe: [jna-users] Correct usage of Flas...
FromSent OnAttachments
James MogerJan 8, 2009 8:43 am 
Daniel KaufmannJan 8, 2009 2:14 pm 
James MogerJan 9, 2009 1:35 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Correct usage of FlashWindowExActions...
From:Daniel Kaufmann (dani@gmail.com)
Date:Jan 8, 2009 2:14:30 pm
List:net.java.dev.jna.users

It looks to me you are not setting User32.FLASHWINFO correctly. You need to set *cbSize *field (I didn't checked the names of the fields in the jna code but in msdn, but I they should be the same) to the size of the structure. I believe you can call info.size() for getting the size of the structure. -Daniel

On 1/8/09, James Moger <jame@gmail.com> wrote:

Hi all,

I've been using the registry manipulation bits of JNA with great success for some time now. I want to use the FlashWindowEx function which is at least stubbed in the User32 interface. I haven't found any previous mailing list posting about it nor has Google turned up anything useful.

The following code does not throw any exceptions but also does nothing:

HWND hwnd = new HWND(); hwnd.setPointer(Native.getComponentPointer(myJframe)); User32 user = User32.INSTANCE; User32.FLASHWINFO info = new User32.FLASHWINFO(); info.dwFlags = User32.FLASHW_ALL | User32.FLASHW_TIMERNOFG; // flash titlebar & task bar until activated info.hWnd = hwnd; user.FlashWindowEx(info);

I'm using an older release (3.0.1) on WinXP.

Does anyone have suggestions on what I may be doing wrong?