Can I get HWND from DocumentWindow?

Hello,
I think, there is no HWND in juce::Component
but juce::DocumentWindow must have HWND, hInstance, WndClass and WndProc etc

So can I get the HWND handle, hInstance value of an object juce::DocumentWindow ?

(Also, I found there is juce::HWNDComponent , anyway)

Thank you

With any Component, you can call getPeer() to obtain the ComponentPeer that represents the native object that contains it, and then calling getNativeHandle() on the obtained ComponentPeer will give you the HWND on Windows

1 Like

Dear Federico:

Oh, thank you so much for your precise help !
ComponentPeer, which I didn’t know, is quite interesting to me
So I believe I can work JUCE with Vulkan at the same time, which is so fascinating !
So thank you again and have a great weekend, Federico
See you again

1 Like