Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Howto JNative User32.EnumChildWindows?

843829Dec 14 2009 — edited Apr 18 2010
Hi!

I want to show a child window on top of its parent. The parent gets hidden before. When i show the parent again the child is still hidden.

I try to use JNATIVE.

Thats the code i tried so far. Of course it's not working.

I found [http://forums.sun.com/thread.jspa?threadID=5296765] , but it was not enought help for me. It would be great if someone could explain what to do further. I already spend a lot time by searching the internet...
                    Callback c = new Callback() {
                        private int address = 0;
 
                        @Override
                        public int callback(long[] arg0)
                        {
                            // ??? what code here?
                            System.out.println("test");
                            return 0;
                        }
 
                        @Override
                        public int getCallbackAddress() throws NativeException
                        {
                            if (address == 0)
                            {
                                address = JNative.createCallback(0, this);
                            }
                            return address;
                        }
                    };
 
                    boolean succeed = User32.EnumChildWindows(cc.getHandle(), c, 0);
                    JNative.releaseCallback(c); //???
Would be very pleased about help.

Best Regards.

Edited by: enib.s on Dec 14, 2009 8:32 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 16 2010
Added on Dec 14 2009
6 comments
436 views