mrDarker
2025-08-15 c6e24163c3c852b4ac3e45d100b9253b3db0e182
EdgeInspector_App/View/ViewMain_ScanImage.cpp
@@ -286,7 +286,11 @@
               strTitle.Format(_T("BORD[%d]  CHANNEL[%d]"), pCamera->m_iCamera, 0);
               m_staticCamInfo[i].SetWindowText(strTitle);
            }
         }
         }
         if (m_pGlassData != nullptr) {
            m_frameImg[i].SetRecipe(m_pGlassData->GetGlassRecipe());
         }
      }
      m_bInitDlg = TRUE;
@@ -316,12 +320,13 @@
BYTE* CViewMain_ScanImage::GetBufferPoint(int nViewIndex,int nPos /*= 0*/)
{
   BYTE *add = NULL;
   int nIdx_Side    = GetSideIdx(nViewIndex);
   int nIdx_Side = GetSideIdx(nViewIndex);
   LPBYTE plpBuf = NULL;
   if(m_IV2M != NULL)
      plpBuf = m_IV2M->IV2M_GetGrabBufferByDimension((DimensionDir)nIdx_Side,nPos);
   if (m_IV2M != NULL) {
      plpBuf = m_IV2M->IV2M_GetGrabBufferByDimension((DimensionDir)nIdx_Side, nPos);
   }
   return plpBuf;
}
@@ -330,8 +335,7 @@
   PROG_MSG MsgJob = *((PROG_MSG*)wParam);   
   int nIndex = GetViewIndex(MsgJob.nSide);
   if(MsgJob.nState == 2)
   {
   if(MsgJob.nState == 2) {
      InitScrollInfo(MsgJob.nSide,1);
      m_ctrlScrollV[nIndex].EnableWindow(TRUE);
@@ -355,23 +359,7 @@
      m_frameImg[nIndex].SetGlassData(m_pGlassData);
      m_frameImg[nIndex].Invalidate();
   }
   else
   {
      /*
      if(fabs(m_dZoom - 1.) > 0.01)
      {
         m_dZoom = 0.2;
         m_sliderZoom.SetPos(0);
         CString strTmp;
         strTmp.Format(_T("X %.2f"),m_dZoom);
         GetDlgItem(IDC_ST_ZOOM)->SetWindowText(strTmp);
         UpdateZoom();
      }
      */
      //g_pLog->DisplayMessage(_T("Frame Display %d"),nIndex);
   else {
      CPoint ptOrg = m_frameImg[nIndex].GetDisplayPos();
      ptOrg.y = MsgJob.nDispLine;
@@ -385,7 +373,7 @@
void CViewMain_ScanImage::SetupImageSave()
{
   ManualThreadStart(M_CMD_IMG_SAVE_ALL,-1);
   ManualThreadStart(M_CMD_IMG_SAVE_ALL, -1);
}
void CViewMain_ScanImage::SetRecipe(CHardwareSettings *pHW)
@@ -395,10 +383,9 @@
void CViewMain_ScanImage::ResetView()
{
   for(int i = 0; i < MAX_PANEL_SIDE * UPDN_TYPE; i++)
   {
   for(int i = 0; i < MAX_PANEL_SIDE * UPDN_TYPE; i++) {
      m_ctrlScrollV[i].EnableWindow(FALSE);
   }
   }
}
void CViewMain_ScanImage::ViewRefresh(PROG_MSG ProcMsg)
@@ -1030,8 +1017,8 @@
   if (NULL == pGlassRcp) return;
#endif
   CString         strRcpName = pGlassRcp->GetRecipeName();
   CString         strGlassID = g_pBase->m_strHPanelID;
   CString   strRcpName = pGlassRcp->GetRecipeName();
   CString   strGlassID = g_pBase->m_strHPanelID;
   if(strGlassID.IsEmpty() == TRUE) {
      strGlassID = _T("Manual_ID");
@@ -1099,11 +1086,10 @@
      if(nLength > 10) {      
         if(ptStart.y+nLength < nMaxSize) {
            strPath.Format(_T("%s\\DebugFullImage\\%s\\%s\\%s\\%s\\%s__%s_%d"),PATH_INSPECTION_DATA,strDate,strRcpName,strGlassID,strTime,strGlassID,PANEL_SIDE[iSide],nFrame);      
            m_IV2M->IV2M_SaveFullImage(strPath,iSide,ptStart,nLength);
            m_IV2M->IV2M_SaveFullImage(strPath,iSide,ptStart,nLength);
            g_pLog->DisplayMessage(_T("%s %d Save Completed : %s"), PANEL_SIDE[iSide], nFrame, strPath);
         }         
      }
      g_pLog->DisplayMessage(_T("%s %d Save Completed : %s"),PANEL_SIDE[iSide],nFrame,strPath);
   }
}
@@ -1367,7 +1353,7 @@
CCameraSettings* CViewMain_ScanImage::GetCameraSettingsByViewIndex(int nViewIndex)
{
   CCameraSettings* pCamera = NULL;
   if (nullptr != m_pHardware) {
   if (nullptr == m_pHardware) {
      return pCamera;
   }