level 1
EggLee_
楼主
用opencv显示视频流,调用namedWindow时界面闪烁,查阅相关资料是因为调用namedWindow函数会创建父窗口和子窗口,再隐藏父窗口所致。求教各位大神怎样解决这一问题,万分感谢!
代码如下:
pWnd[3] = GetDlgItem(IDC_Sony);
pWnd[3]->SetWindowPos(NULL, 1 * nFullWidth / 1366, 6 * nFullHeight / 768, 1077 * nFullWidth / 1366, 600 * nFullHeight / 768, SWP_NOZORDER);
namedWindow("view_video_sony", WND_PROP_FULLSCREEN);
resizeWindow("view_video_sony", 1077 * nFullWidth / 1366, 600 * nFullHeight / 768);
hWnd = (HWND)cvGetWindowHandle("view_video_sony");
hParent = ::GetParent(hWnd);
::SetParent(hWnd, GetDlgItem(IDC_Sony)->m_hWnd);
::ShowWindow(hParent, SW_HIDE);
2020年11月09日 07点11分
1
代码如下:
pWnd[3] = GetDlgItem(IDC_Sony);
pWnd[3]->SetWindowPos(NULL, 1 * nFullWidth / 1366, 6 * nFullHeight / 768, 1077 * nFullWidth / 1366, 600 * nFullHeight / 768, SWP_NOZORDER);
namedWindow("view_video_sony", WND_PROP_FULLSCREEN);
resizeWindow("view_video_sony", 1077 * nFullWidth / 1366, 600 * nFullHeight / 768);
hWnd = (HWND)cvGetWindowHandle("view_video_sony");
hParent = ::GetParent(hWnd);
::SetParent(hWnd, GetDlgItem(IDC_Sony)->m_hWnd);
::ShowWindow(hParent, SW_HIDE);