oid CMainDlg::OnActiveimage()
{
USING_NAMESPACE_HALCON;
CMainFrame *pMainFrame =(CMainFrame*)GetParentFrame();
CInspectorView *pView=(CInspectorView*)(pMainFrame->GetActiveView());
CWnd *pWnd0 = (CWnd*)pView->GetDlgItem(IDC_DISPLAY_FRAME0);
pWnd0->ShowWindow(SW_HIDE);
CButton *pBox0 = (CButton*)GetDlgItem(IDC_SWITCH_TO_CAMERA0);
CButton *pBox1 = (CButton*)GetDlgItem(IDC_SWITCH_TO_CAMERA1);
CButton *pBox2 = (CButton*)GetDlgItem(IDC_SWITCH_TO_CAMERA2);
CButton *pBox3 = (CButton*)GetDlgItem(IDC_SWITCH_TO_CAMERA3);
pBox0->SetCheck(TRUE);
pBox1->SetCheck(FALSE);
pBox2->SetCheck(FALSE);
pBox3->SetCheck(FALSE);
m_Camera_Switch[0] = TRUE;
GetDlgItem(IDC_GRABSTART)->EnableWindow(FALSE);
GetDlgItem(IDC_ACTIVEIMAGE)->EnableWindow(FALSE);
GetDlgItem(IDC_DATA_DISPLAY)->EnableWindow(FALSE);
GetDlgItem(IDC_IMAGE_SAVE)->EnableWindow(FALSE);
GetDlgItem(IDC_FAIL_TO_STOP)->EnableWindow(FALSE);
GetDlgItem(IDC_CLEAN)->EnableWindow(FALSE);
GetDlgItem(IDC_SONGLIAO_NO_MOVE)->EnableWindow(FALSE);
GetDlgItem(IDC_SECOND_CHECK)->EnableWindow(FALSE);
GetDlgItem(IDC_EXCEPTIONAL_HANDLE)->EnableWindow(FALSE);
clear_window(m_lWindowID_Display0);
// clear_window(m_lWindowID_Display1);
outport_bit(1,6,0);
outport_bit(1,8,1);
// outport_bit(1,10,1);
// outport_bit(1,12,1);
if(pMainFrame->m_bCamera_Living_Grab)
{
// pMainFrame->m_bCamera_Living_Grab = FALSE;
}
else
{
Camera_To_Living();
pMainFrame->m_bCamera_Living_Grab = TRUE;
pMainFrame->m_pCamera0_Active_Thread=AfxBeginThread(pMainFrame->Camera_Living_Grab,
pMainFrame,
THREAD_PRIORITY_NORMAL,
0,
CREATE_SUSPENDED);
pMainFrame->m_pCamera0_Active_Thread->ResumeThread();
}
}
CMainFrame *pMainFrame =(CMainFrame*)GetParentFrame(); 两个*号是什么意思啊??
|