4 messages in net.java.dev.jna.usersRe: [jna-users] Structuring of a Call...
FromSent OnAttachments
Dale...@coats.comMay 9, 2008 1:13 pm 
Timothy WallMay 9, 2008 1:25 pm 
Dale...@coats.comMay 11, 2008 1:58 pm 
Timothy WallMay 11, 2008 4:44 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] Structuring of a Callback on Windows User32Actions...
From:Timothy Wall (twal@dev.java.net)
Date:May 11, 2008 4:44:59 pm
List:net.java.dev.jna.users

On May 11, 2008, at 4:59 PM, Dale@coats.com wrote:

I renamed the method, but that didn't do it. I think I'm missing a window handle, and I don't know how to get it. Starting a Java thread is not the answer (no native handle).

You can get a window handle from any Java Window by using Native.getWindowHandle(). Seems the system tray wants a window handle even if you never show a window. You will need to at least pack() whatever window you use (not necessarily show it) to ensure it has a native window allocated to it.

Not sure how any messages will actually show up; you may have to spawn a thread dedicated to polling/waiting for windows messages (like the keyboard hook example in JNA).