void CMainFrame::OnStopsnap() { // TODO: Add your command handler code here OnSnapexStop(); OnSnapexClose(); CView *pView = GetActiveView(); //获取当前VIEW视图 CDC *pDC = pView->GetDC(); //得到VIEW的DC RECT rect; GetClientRect(&rect); pDC->FillSolidRect(&rect, RGB(255, 255, 255)); pView->ReleaseDC(pDC); }
DaHengCamera::~DaHengCamera() { if(cameraOpened){ OnSnapexStop(); OnSnapexClose(); HVSTATUS status = STATUS_OK; // 关闭数字摄像机,释放数字摄像机内部资源 status = EndHVDevice(m_hhv_1); status = EndHVDevice(m_hhv_2); // 回收图像缓冲区 delete []m_pRawBuffer_1; delete []m_pRawBuffer_2; } }
void DaHengCamera::closeCamera() { OnSnapexStop(); OnSnapexClose(); HVSTATUS status = STATUS_OK; // 关闭数字摄像机,释放数字摄像机内部资源 status = EndHVDevice(m_hhv_1); status = EndHVDevice(m_hhv_2); // // 回收图像缓冲区 // delete []m_pRawBuffer_1; // delete []m_pRawBuffer_2; cameraOpened = false; }