Jaimie Vos Posted May 1, 2021 Share Posted May 1, 2021 I saw the OpenGL example with the Ultra App Kit. Currently I have my OpenCV window instead of OpenGL and I am trying to get this into my Ultra Game Kit window. How can I go about this and get this done? Quote Link to comment Share on other sites More sharing options...
Josh Posted May 1, 2021 Share Posted May 1, 2021 So you created the window with OpenCV? Can OpenCV create a window or context from an existing HWND? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted May 2, 2021 Share Posted May 2, 2021 It might also be possible for me to add a window creation command like this: shared_ptr<Window> CreateWindow(HWND handle) But in that case you would be responsible for feeding all events into the user interface. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Jaimie Vos Posted May 2, 2021 Author Share Posted May 2, 2021 14 hours ago, Josh said: So you created the window with OpenCV? Can OpenCV create a window or context from an existing HWND? OpenCV has a method to receive the HWND. But I don't really get how I can change this with the opengl example. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 2, 2021 Share Posted May 2, 2021 Window::GetHandle() will return the HWND: https://www.ultraengine.com/learn/CPP/Window_GetHandle So start with that? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Jaimie Vos Posted May 2, 2021 Author Share Posted May 2, 2021 2 hours ago, Josh said: Window::GetHandle() will return the HWND: https://www.ultraengine.com/learn/CPP/Window_GetHandle So start with that? I think I didn't explain well enough what I mean. I want to have my opencv window inside my ultra app kit window. Not my ultra app kit window inside of my opencv window. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 2, 2021 Share Posted May 2, 2021 Maybe this will do it: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setparent Then use ListenEvent to run a callback when a window resize event occurs, and use that to adjust the size of your child window whenever the parent resizes. You will want to use the WS_CHILD style flag when your child window is created in OpenCV, or set it after. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.