Jump to content

OpenCV window in Ultra App Kit viewport


Jaimie Vos
 Share

Recommended Posts

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.

  • Like 1

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

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.

Link to comment
Share on other sites

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...