Jump to content

  • Log In with Google      Sign In   
  • Create Account

Get Swing control HWND (window handle) in c++


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 csisy   Members   -  Reputation: 245

Like
0Likes
Like

Posted 20 October 2013 - 12:33 PM

Hi,

 

I've read a lot about this problem, but I haven't found the proper solution.

 

I'm working on a c++ game (and engine) which uses OpenGL as graphics API.

I've decided that I create the editor in Java with Swing. I'm using JDK 1.7 x86 version (but I'm on Win7 x64)

 

The problem is that I need the handle (HWND) of the "preview control" (a simple JPanel) in the c++ code (to initialize the OpenGL).

I know how the native wrapper works, the problem is the HWND getting.

 

I've read about the AWT solution: get awt, get graphics component, and get the window handle. It would be great for me, but it crashes and I don't know why.

 

Of course it's important that if I send the editor to the artists, they have to be able to run it without any trick (just install a JVE 1.7)

 

Has anyone any idea?

 

Thanks,

csisy


sorry for my bad english :)

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS