gpt4 book ai didi

c++ - opencv4+ 中 cvGetWindowHandle() 的替代方案

转载 作者:行者123 更新时间:2023-11-30 04:42:25 24 4
gpt4 key购买 nike

我在我的 MFC 应用程序中使用 Opencv3.4.8。我正在使用 cvGetWindowHandle() 获取窗口句柄,如下所示;

namedWindow(windowname, WINDOW_AUTOSIZE);
HWND hWnd = (HWND) cvGetWindowHandle(windowname.c_str());
HWND hParent = ::GetParent(hWnd);
::SetParent(hWnd, GetDlgItem(IDC_PICTURE)->m_hWnd);
::ShowWindow(hParent, SW_HIDE);
CWnd* pWnd = new CWnd();
pWnd->CWnd::Attach(hParent);

现在我想升级到Opencv4+,Opencv4+中没有cvGetWindowHandle()。我想知道 Opencv4+ 中是否有替代函数,如果没有,我该如何在 opencv4+ 中完成相同的任务。

最佳答案

#3091 . getWindowProperty(window_name, WND_PROP_AUTOSIZE) >= 0 应该替换 cvGetWindowHandle()

关于c++ - opencv4+ 中 cvGetWindowHandle() 的替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58740830/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com