How to force window to foreground created by JNI call

I have a Java application that runs a JNI command on a C ++ dll that creates Win32 for me. I would like this window to appear on top of my Java application when this happens, no matter what I try, the C ++ generated window always appears under my java application window.

I tried calling SetForegroundWindow

and AllowSetForegroundWindow

from my dll, but that doesn't seem to work. Any ideas on what else I could try? I feel like I have to tell the Java app to free itself somehow so that another window appears on top.

+3


source to share





All Articles