|
@@ -634,15 +634,8 @@ void CMainFrame::OnCameraCombobox()
|
|
|
if ( pView->m_pCamera )
|
|
|
delete pView->m_pCamera;
|
|
|
pView->m_pCamera = NULL;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- m_pChildFrame->CloseWindow();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ pView->DestroyWindow();
|
|
|
+ m_pChildFrame->DestroyWindow();
|
|
|
m_pChildFrame = NULL;
|
|
|
}
|
|
|
|
|
@@ -653,7 +646,9 @@ void CMainFrame::OnCameraCombobox()
|
|
|
m_pChildFrame = new CChildFrame();
|
|
|
context.m_pLastView = NULL;
|
|
|
context.m_pCurrentFrame = this;
|
|
|
- context.m_pCurrentDoc = m_pDoc;
|
|
|
+
|
|
|
+
|
|
|
+ context.m_pCurrentDoc = NULL;
|
|
|
context.m_pNewViewClass = RUNTIME_CLASS(CFieldTestToolView);
|
|
|
context.m_pNewDocTemplate = m_pDocTemplate;
|
|
|
|
|
@@ -1045,7 +1040,7 @@ BOOL CMainFrame::OnDeviceChange(UINT nEventType, DWORD_PTR dwData)
|
|
|
{
|
|
|
OutputDebugString(_T("设备有变化===============\n"));
|
|
|
|
|
|
- if ( nEventType == DBT_DEVICEARRIVAL)
|
|
|
+ if ( nEventType == DBT_DEVICEARRIVAL )
|
|
|
Sleep(1000);
|
|
|
|
|
|
EnumDevices(vtDevices);
|
|
@@ -1069,15 +1064,13 @@ BOOL CMainFrame::OnDeviceChange(UINT nEventType, DWORD_PTR dwData)
|
|
|
if ( pView->m_pCamera )
|
|
|
delete pView->m_pCamera;
|
|
|
pView->m_pCamera = NULL;
|
|
|
- pView->CloseWindow();
|
|
|
pView->DestroyWindow();
|
|
|
|
|
|
- m_pChildFrame->CloseWindow();
|
|
|
+ m_pChildFrame->DestroyWindow();
|
|
|
m_pChildFrame = NULL;
|
|
|
|
|
|
|
|
|
pCameraCombo->DeleteItem(nCurSel);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|