In a Java application (JRE 1.5.0_12) on Windows XP, I call a native method:
public native int attachImage( ... );
… which lives in a Visual C++ 6.0 .dll. It displays an application-modal window. Problem is, the application’s tray icon doesn’t respond to mouseclicks while this window has focus. This is an issue because when this window is displayed, users often switch to another application to select the image to attach, then want to restore this application.
What GUI package are you using?
You should be able to implement this without resorting to JNI calls.
For instance, in SWT, you can open an application modal shell like this:
For swing, this would be: