Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

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   

400
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 :)




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.