From 6d5796902a980f189f470a4e8ea7084548c52f49 Mon Sep 17 00:00:00 2001
From: KEJ <kimeungju@diteam.co.kr>
Date: 월, 26 6월 2023 17:43:48 +0900
Subject: [PATCH] Ongoing80 #4528 CF AOI Review Motor Offset 기능 추가 1. Motor Offset 설정 Dlg 추가. 2. Offset 파라미터 추가. 3. Motor Offset 기능 적용

---
 Internal_Library/CHCommonControls/GridCellBase.cpp                   |  110 +++
 Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.pdb                  |    0 
 Internal_Library/bin/CHEdgeTriangle_x64_vc15.pdb                     |    0 
 ReviewSystem/bin/ReviewRecipeEditor.exe                              |    0 
 DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.pdb                |    0 
 Internal_Library/bin/CHSignalControls_Network_x64_vc15.pdb           |    0 
 ReviewSystem/bin/CHDefectPickerd_x64_vc15.dll                        |    0 
 Internal_Library/bin/CHEdgeTriangle_x64_vc15.dll                     |    0 
 Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.dll                  |    0 
 Internal_Library/lib/CHCommonControlsd_x64_vc15.lib                  |    0 
 ReviewSystem/bin/CHDefectPicker_x64_vc15.dll                         |    0 
 ReviewSystem/bin/ReviewSystemSetting.exe                             |    0 
 ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.pdb                   |    0 
 ReviewSystem/bin/ReviewRecipeEditor.pdb                              |    0 
 Internal_Library/bin/CHVirtualGlassMap_x64_vc15.dll                  |    0 
 ReviewSystem/ReviewSystem/DlgLogo.h                                  |    2 
 ReviewSystem/bin/CHDefectPicker_x64_vc15.pdb                         |    0 
 Internal_Library/Include/CHCommonControls/GridCellBase.h             |   19 
 ReviewSystem/bin/CHMotorCalibratord_x64_vc15.pdb                     |    0 
 ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.dll                   |    0 
 Internal_Library/bin/CHCommonControls_x64_vc15.dll                   |    0 
 Internal_Library/bin/CHCommonControls_x64_vc15.pdb                   |    0 
 Internal_Library/bin/CHImageReSampler_x64_vc15.pdb                   |    0 
 ReviewSystem/ReviewSystem/ReviewInterface.h                          |   10 
 ReviewSystem/bin/CHMotorCalibratord_x64_vc15.dll                     |    0 
 Internal_Library/bin/CHMotorCalibratord_x64_vc15.dll                 |    0 
 Internal_Library/bin/CHVirtualGlassMap_x64_vc15.pdb                  |    0 
 Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.dll                 |    0 
 ReviewSystem/ReviewSystem/DlgReviewOffSetTool.h                      |   36 
 Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.pdb                 |    0 
 Internal_Library/bin/CHSignalControls_Network_x64_vc15.dll           |    0 
 ReviewSystem/bin/CHDefectPickerd_x64_vc15.pdb                        |    0 
 Internal_Library/bin/CHImageReSampler_x64_vc15.dll                   |    0 
 Internal_Library/bin/CHMotorCalibratord_x64_vc15.pdb                 |    0 
 ReviewSystem/ReviewSystem/ReviewSystem.vcxproj.filters               |    6 
 ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.pdb                   |    0 
 Internal_Library/lib/CHCommonControls_x64_vc15.lib                   |    0 
 Internal_Library/bin/CHAutoLightControls_x64_vc15.pdb                |    0 
 Internal_Library/bin/CHCameraViewer_x64_vc15.pdb                     |    0 
 Internal_Library/bin/CHEdgeTriangled_x64_vc15.dll                    |    0 
 ReviewSystem/lib/CHSignalControlsd_x64_vc15.lib                      |    0 
 Internal_Library/bin/CHEdgeTriangled_x64_vc15.pdb                    |    0 
 ReviewSystem/bin/ReviewSystemd_x64_vc10.exe                          |    0 
 Internal_Library/bin/CHAutoLightControls_x64_vc15.dll                |    0 
 Internal_Library/bin/CHCameraViewer_x64_vc15.dll                     |    0 
 ReviewSystem/bin/CHSignalControls_x64_vc15.dll                       |    0 
 Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj.filters |   18 
 Internal_Library/lib/CHImageMergerd_x64_vc15.lib                     |    0 
 ReviewSystem/ReviewSystem/resource.h                                 |   68 -
 ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.pdb                      |    0 
 ReviewSystem/ReviewSystem/ReviewSystem.vcxproj                       |    4 
 Internal_Library/bin/CHFolderMonitoring_x64_vc15.dll                 |    0 
 Internal_Library/bin/CHCommonControlsd_x64_vc15.dll                  |    0 
 Internal_Library/bin/CHWsiControlsd_x64_vc15.pdb                     |    0 
 ReviewSystem/bin/CHCommonControlsd_x64_vc15.dll                      |    0 
 ReviewSystem/bin/CHReviewResultd_x64_vc15.dll                        |    0 
 Internal_Library/bin/CHWsiControls_x64_vc15.dll                      |    0 
 ReviewSystem/ReviewSystem/SequenceProcessor.h                        |    1 
 ReviewSystem/ReviewSystem/ReviewInterface.cpp                        |   24 
 ReviewSystem/bin/ReviewSystemd_x64_vc10.pdb                          |    0 
 ReviewSystem/bin/CHReviewResultd_x64_vc15.pdb                        |    0 
 ReviewSystem/bin/CHReviewResultParser_x64_vc15.pdb                   |    0 
 ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp                 |    4 
 ReviewSystem/bin/CHCommonControlsd_x64_vc15.pdb                      |    0 
 ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.dll                      |    0 
 ReviewSystem/ReviewSystem/SequenceProcessor.cpp                      |    2 
 Internal_Library/bin/CHWsiControls_x64_vc15.pdb                      |    0 
 Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.dll                 |    0 
 ReviewSystem/bin/CHSignalControls_x64_vc15.pdb                       |    0 
 Internal_Library/bin/CHCommonControlsd_x64_vc15.pdb                  |    0 
 DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.exe                |    0 
 Internal_Library/CHCommonControls/GridCell.cpp                       |    2 
 ReviewSystem/bin/ReviewSystemSetting.pdb                             |    0 
 Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj         |    6 
 Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.pdb                 |    0 
 Internal_Library/bin/CHWsiControlsd_x64_vc15.dll                     |    0 
 ReviewSystem/bin/CHReviewResultParser_x64_vc15.dll                   |    0 
 Internal_Library/bin/CHFolderMonitoringd_x64_vc15.dll                |    0 
 ReviewSystem/bin/CHReviewSettingd_x64_vc15.pdb                       |    0 
 ReviewSystem/bin/CHCommonControls_x64_vc15.dll                       |    0 
 ReviewSystem/bin/CHEdgeTriangled_x64_vc15.dll                        |    0 
 ReviewSystem/bin/CHWsiControlsd_x64_vc15.dll                         |    0 
 ReviewSystem/bin/CHReviewReciped_x64_vc15.dll                        |    0 
 Internal_Library/bin/CHFolderMonitoringd_x64_vc15.pdb                |    0 
 ReviewSystem/bin/CHEdgeTriangled_x64_vc15.pdb                        |    0 
 Internal_Library/bin/CHImageMergerd_x64_vc15.dll                     |    0 
 ReviewSystem/bin/CHReviewSettingd_x64_vc15.dll                       |    0 
 ReviewSystem/bin/CHAfmControlsd_x64_vc15.pdb                         |    0 
 ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.pdb                |    0 
 Internal_Library/Include/CHCommonControls/GridCtrl.h                 |   17 
 ReviewSystem/ReviewSystem/DlgMotorOffSetTool.cpp                     |  736 ++++++++++++++++++++++
 ReviewSystem/bin/CHAfmControlsd_x64_vc15.dll                         |    0 
 ReviewSystem/bin/CHReviewReciped_x64_vc15.pdb                        |    0 
 ReviewSystem/bin/CHEdgeTriangle_x64_vc15.pdb                         |    0 
 ReviewSystem/bin/CHMotorControlsd_x64_vc15.pdb                       |    0 
 ReviewSystem/ReviewSystem/ReviewSystem.rc                            |   33 +
 ReviewSystem/bin/CHReviewResult_x64_vc15.dll                         |    0 
 ReviewSystem/bin/CHSignalControlsd_x64_vc15.pdb                      |    0 
 ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.dll                |    0 
 ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.exe                   |    0 
 ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.exe                    |    0 
 Internal_Library/bin/CHFolderMonitoring_x64_vc15.pdb                 |    0 
 ReviewSystem/ReviewSystem/DlgLogo.cpp                                |    8 
 ReviewSystem/bin/CHReviewResult_x64_vc15.pdb                         |    0 
 ReviewSystem/bin/CHMotorControlsd_x64_vc15.dll                       |    0 
 ReviewSystem/bin/CHEdgeTriangle_x64_vc15.dll                         |    0 
 Internal_Library/bin/CHImageMergerd_x64_vc15.pdb                     |    0 
 Internal_Library/Include/CHCommonControls/GridCell.h                 |    2 
 ReviewSystem/ReviewSystem/DlgMotorOffSetTool.h                       |  151 ++++
 ReviewSystem/bin/CHWsiControlsd_x64_vc15.pdb                         |    0 
 Internal_Library/CHCommonControls/GridCtrl.cpp                       |  623 ++++++++++++++----
 Internal_Library/bin/CHImageReSamplerd_x64_vc15.pdb                  |    0 
 ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.pdb                   |    0 
 Internal_Library/bin/CHImageMerger_x64_vc15.dll                      |    0 
 Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.pdb          |    0 
 ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.pdb                    |    0 
 ReviewSystem/bin/CHLightControlsd_x64_vc15.dll                       |    0 
 ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.pdb                 |    0 
 ReviewSystem/bin/CHWsiControls_x64_vc15.pdb                          |    0 
 ReviewSystem/bin/ReviewSystem.pdb                                    |    0 
 ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.pdb                  |    0 
 ReviewSystem/bin/CHLightControlsd_x64_vc15.pdb                       |    0 
 ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.dll                 |    0 
 Internal_Library/bin/CHMotorCalibrator_x64_vc15.dll                  |    0 
 ReviewSystem/bin/CHResultFileManagerd_x64_vc15.pdb                   |    0 
 ReviewSystem/bin/CHWsiControls_x64_vc15.dll                          |    0 
 ReviewSystem/bin/CHMotorCalibrator_x64_vc15.dll                      |    0 
 ReviewSystem/ReviewSystem/ReviewSystemView.h                         |    4 
 Internal_Library/bin/CHCameraViewerd_x64_vc15.dll                    |    0 
 ReviewSystem/bin/CHAlignFinderd_x64_vc15.pdb                         |    0 
 ReviewSystem/bin/CHResultFileManagerd_x64_vc15.dll                   |    0 
 Internal_Library/bin/CHAutoLightControlsd_x64_vc15.pdb               |    0 
 ReviewSystem/ReviewSystem/stdafx.h                                   |   18 
 ReviewSystem/bin/CHSignalControlsd_x64_vc15.dll                      |    0 
 ReviewSystem/bin/CHAlignFinderd_x64_vc15.dll                         |    0 
 Internal_Library/bin/CHAutoLightControlsd_x64_vc15.dll               |    0 
 ReviewSystem/bin/CHMotorCalibrator_x64_vc15.pdb                      |    0 
 Internal_Library/bin/CHImageReSamplerd_x64_vc15.dll                  |    0 
 Internal_Library/bin/CHCameraViewerd_x64_vc15.pdb                    |    0 
 ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.dll                  |    0 
 ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.dll                |    0 
 ReviewSystem/bin/ReviewSystem.exe                                    |    0 
 ReviewSystem/bin/CHReviewResultParserd_x64_vc15.dll                  |    0 
 ReviewSystem/bin/CHAutoLightControls_x64_vc15.pdb                    |    0 
 ReviewSystem/bin/CHReviewResultParserd_x64_vc15.pdb                  |    0 
 ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.dll                     |    0 
 ReviewSystem/ReviewSystem/ReviewSystemView.cpp                       |   20 
 Internal_Library/bin/CHMotorCalibrator_x64_vc15.pdb                  |    0 
 ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.pdb                |    0 
 Internal_Library/bin/CHImageMerger_x64_vc15.pdb                      |    0 
 ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.pdb                     |    0 
 ReviewSystem/bin/CHAutoLightControls_x64_vc15.dll                    |    0 
 ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.dll                   |    0 
 Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.dll          |    0 
 ReviewSystem/bin/CHCommonControls_x64_vc15.pdb                       |    0 
 155 files changed, 1,662 insertions(+), 262 deletions(-)

diff --git a/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.exe b/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.exe
index 1fdb522..8cc0eae 100644
--- a/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.exe
+++ b/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.exe
Binary files differ
diff --git a/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.pdb b/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.pdb
index 4dc3fff..7cd43f2 100644
--- a/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.pdb
+++ b/DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.pdb
Binary files differ
diff --git a/Internal_Library/CHCommonControls/GridCell.cpp b/Internal_Library/CHCommonControls/GridCell.cpp
index c354af5..565315b 100644
--- a/Internal_Library/CHCommonControls/GridCell.cpp
+++ b/Internal_Library/CHCommonControls/GridCell.cpp
@@ -61,7 +61,7 @@
 /////////////////////////////////////////////////////////////////////////////
 // GridCell Attributes
 
-void CGridCell::operator=(const CGridCell& cell)
+void CGridCell::operator=(CGridCell& cell)
 {
     if (this != &cell) CGridCellBase::operator=(cell);
 }
diff --git a/Internal_Library/CHCommonControls/GridCellBase.cpp b/Internal_Library/CHCommonControls/GridCellBase.cpp
index c33b250..4bc7925 100644
--- a/Internal_Library/CHCommonControls/GridCellBase.cpp
+++ b/Internal_Library/CHCommonControls/GridCellBase.cpp
@@ -68,13 +68,19 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // GridCellBase Operations
-
 void CGridCellBase::Reset()
 {
+	m_Hide=false;
     m_nState  = 0;
+	m_MergeRange.Set();
+	m_IsMergeWithOthers=false;
+	m_MergeCellID.row=-1;
+	m_MergeCellID.col=-1;
+
+
 }
 
-void CGridCellBase::operator=(const CGridCellBase& cell)
+void CGridCellBase::operator=( CGridCellBase& cell)
 {
 	if (this == &cell) return;
 
@@ -89,6 +95,11 @@
     SetBackClr(cell.GetBackClr());
     SetFont(cell.IsDefaultFont()? NULL : cell.GetFont());
     SetMargin(cell.GetMargin());
+//Used for merge cells
+//by Huang Wei
+	SetMergeCellID(cell.GetMergeCellID());
+	SetMergeRange(cell.GetMergeRange());
+	Show(cell.IsShow());
 }
 
 /////////////////////////////////////////////////////////////////////////////
@@ -114,6 +125,14 @@
 {
     // Note - all through this function we totally brutalise 'rect'. Do not
     // depend on it's value being that which was passed in.
+
+	//Used for merge cells
+	//by Huang Wei
+	if(	m_Hide && !IsMerged())
+	{
+		return TRUE;
+	}
+
 
     CGridCtrl* pGrid = GetGrid();
     ASSERT(pGrid);
@@ -206,7 +225,7 @@
             rect.bottom--;
         }
 
-		//rect.DeflateRect(0,1,1,1);  - Removed by Yogurt
+		rect.DeflateRect(0,1,1,1); 
     }
     else if ((GetState() & GVIS_SELECTED))
     {
@@ -277,10 +296,7 @@
             pDC->SelectObject(pFont);
     }
 
-    //rect.DeflateRect(GetMargin(), 0); - changed by Yogurt
-    rect.DeflateRect(GetMargin(), GetMargin());    
-    rect.right++;    
-    rect.bottom++;
+    rect.DeflateRect(GetMargin(), 0);
 
     if (pGrid->GetImageList() && GetImage() >= 0)
     {
@@ -336,8 +352,7 @@
         BOOL bVertical = (GetFont()->lfEscapement == 900);
 
         // Only draw if it'll fit!
-        //if (size.cx + rect.left < rect.right + (int)(2*GetMargin())) - changed / Yogurt
-        if (size.cx + rect.left < rect.right)
+        if (size.cx + rect.left < rect.right + (int)(2*GetMargin()))
         {
             int nTriangleBase = rect.bottom - nOffset - size.cy;    // Triangle bottom right
             //int nTriangleBase = (rect.top + rect.bottom - size.cy)/2; // Triangle middle right
@@ -610,6 +625,13 @@
 // printed correctly.
 BOOL CGridCellBase::PrintCell(CDC* pDC, int /*nRow*/, int /*nCol*/, CRect rect)
 {
+	//Used for merge cells
+	//by Huang Wei
+	if(	m_Hide && !IsMerged())
+	{
+		return TRUE;
+	}
+
 #if defined(_WIN32_WCE_NO_PRINTING) || defined(GRIDCONTROL_NO_PRINTING)
     return FALSE;
 #else
@@ -627,6 +649,11 @@
     int nSavedDC = pDC->SaveDC();
 
     pDC->SetBkMode(TRANSPARENT);
+	//Used for merge cells
+	//by Huang Wei
+	rect.InflateRect(1,1);
+	pDC->Rectangle(rect);
+	rect.DeflateRect(1,1);
 
     if (pGrid->GetShadedPrintOut())
     {
@@ -770,4 +797,67 @@
         return pGrid->SendMessageToParent(nRow, nCol, nMessage);
     else
         return 0;
-}
\ No newline at end of file
+}
+//Used for merge cells
+//by Huang Wei
+void CGridCellBase::Show(bool IsShow)
+{
+	m_Hide=!IsShow;
+}
+//Used for merge cells
+//by Huang Wei
+void CGridCellBase::SetMergeRange(CCellRange range)
+{
+	m_MergeRange=range;
+}
+//Used for merge cells
+//by Huang Wei
+CCellRange CGridCellBase::GetMergeRange()
+{
+	return m_MergeRange;
+}
+//Used for merge cells
+//by Huang Wei
+bool CGridCellBase::IsMerged()
+{
+	return m_MergeRange.Count()>1;
+}
+//Used for merge cells
+//by Huang Wei
+void CGridCellBase::SetMergeCellID(CCellID cell)
+{
+	m_MergeCellID=cell;
+	if(cell.row!=-1)
+		m_IsMergeWithOthers=true;
+	else
+		m_IsMergeWithOthers=false;
+
+}
+//Used for merge cells
+//by Huang Wei
+CCellID CGridCellBase::GetMergeCellID()
+{
+	return m_MergeCellID;
+}
+//Used for merge cells
+//by Huang Wei
+bool CGridCellBase::IsMergeWithOthers()
+{
+	return m_IsMergeWithOthers;
+}
+//Used for merge cells
+//by Huang Wei
+bool CGridCellBase::IsShow()
+{
+	return !m_Hide;
+}
+//Used for merge cells
+//by Huang Wei
+void CGridCellBase::UnMerge()
+{
+	m_Hide=false;
+	m_MergeRange.Set();
+	m_IsMergeWithOthers=false;
+	m_MergeCellID.row=-1;
+	m_MergeCellID.col=-1;
+}
diff --git a/Internal_Library/CHCommonControls/GridCtrl.cpp b/Internal_Library/CHCommonControls/GridCtrl.cpp
index b486b5a..16e6e73 100644
--- a/Internal_Library/CHCommonControls/GridCtrl.cpp
+++ b/Internal_Library/CHCommonControls/GridCtrl.cpp
@@ -190,6 +190,28 @@
 /////////////////////////////////////////////////////////////////////////////
 // CGridCtrl
 
+CCellID CGridCtrl::GetMergeCellID(CCellID cell)
+{
+	CGridCellBase *pCell = (CGridCellBase*)GetCell(cell);
+	if (pCell && pCell->IsMergeWithOthers())
+		return pCell->GetMergeCellID();
+	return cell;
+}
+
+int  CGridCtrl::GetMergeCellHeight(CCellID cell)
+{
+	CCellID mergecell = GetMergeCellID(cell);
+	CGridCellBase *pCell = (CGridCellBase*)GetCell(mergecell);
+	if (!pCell->IsMerged())
+		return GetRowHeight(cell.row);
+	int height = 0;
+	for (int mergerow = pCell->GetMergeRange().GetMaxRow();mergerow >= pCell->GetMergeRange().GetMinRow();mergerow--)
+	{
+		height += GetRowHeight(mergerow);
+	}
+	return height;
+}
+
 CGridCtrl::CGridCtrl(int nRows, int nCols, int nFixedRows, int nFixedCols)
 {
     RegisterWindowClass();
@@ -330,8 +352,10 @@
 
     if (!(::GetClassInfo(hInst, GRIDCTRL_CLASSNAME, &wndcls)))
     {
-        // otherwise we need to register a new class
-        wndcls.style            = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
+		// otherwise we need to register a new class
+		//< SWK 20201123 - #2803 MOD >
+//		wndcls.style            = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
+		wndcls.style            = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
         wndcls.lpfnWndProc      = ::DefWindowProc;
         wndcls.cbClsExtra       = wndcls.cbWndExtra = 0;
         wndcls.hInstance        = hInst;
@@ -1650,178 +1674,343 @@
     if (GetVirtualMode())
         SendCacheHintToParent(VisCellRange);
 
-    // draw top-left cells 0..m_nFixedRows-1, 0..m_nFixedCols-1
-    rect.bottom = -1;
-    for (row = 0; row < m_nFixedRows; row++)
-    {
-        if (GetRowHeight(row) <= 0) continue;
+	CPen pen;
+	pen.CreatePen(PS_SOLID, 0, m_crGridLineColour);
+	pDC->SelectObject(&pen);
 
-        rect.top = rect.bottom+1;
-        rect.bottom = rect.top + GetRowHeight(row)-1;
-        rect.right = -1;
+	// draw vertical lines (drawn at ends of cells)
+	if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_VERT)
+	{
+		int x = nFixedColWidth;
+		for (col = minVisibleCol; col <= maxVisibleCol; col++)
+		{
+			if (GetColumnWidth(col) <= 0) continue;
 
-        for (col = 0; col < m_nFixedCols; col++)
-        {
-            if (GetColumnWidth(col) <= 0) continue;
+			x += GetColumnWidth(col);
+			pDC->MoveTo(x - 1, nFixedRowHeight);
+			pDC->LineTo(x - 1, VisRect.bottom);
+		}
+	}
 
-            rect.left = rect.right+1;
-            rect.right = rect.left + GetColumnWidth(col)-1;
+	// draw horizontal lines (drawn at bottom of each cell)
+	if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_HORZ)
+	{
+		int y = nFixedRowHeight;
+		for (row = minVisibleRow; row <= maxVisibleRow; row++)
+		{
+			if (GetRowHeight(row) <= 0) continue;
 
-            pCell = GetCell(row, col);
-            if (pCell)
+			y += GetRowHeight(row);
+			pDC->MoveTo(nFixedColWidth, y - 1);
+			pDC->LineTo(VisRect.right, y - 1);
+		}
+	}
+
+	pDC->SelectStockObject(NULL_PEN);
+
+	// draw rest of non-fixed cells
+	rect.bottom = nFixedRowHeight - 1;
+	for (row = minVisibleRow; row <= maxVisibleRow; row++)
+	{
+		if (GetRowHeight(row) <= 0) continue;
+
+		rect.top = rect.bottom + 1;
+		rect.bottom = rect.top + GetRowHeight(row) - 1;
+
+		// rect.bottom = bottom pixel of previous row
+		if (rect.top > clipRect.bottom)
+			break;                // Gone past cliprect
+		if (rect.bottom < clipRect.top)
+			continue;             // Reached cliprect yet?
+
+		rect.right = nFixedColWidth - 1;
+		for (col = minVisibleCol; col <= maxVisibleCol; col++)
+		{
+			if (GetColumnWidth(col) <= 0) continue;
+
+			rect.left = rect.right + 1;
+			rect.right = rect.left + GetColumnWidth(col) - 1;
+
+			if (rect.left > clipRect.right)
+				break;        // gone past cliprect
+			if (rect.right < clipRect.left)
+				continue;     // Reached cliprect yet?
+
+			pCell = GetCell(row, col);
+			// TRACE(_T("Cell %d,%d type: %s\n"), row, col, pCell->GetRuntimeClass()->m_lpszClassName);
+			if (pCell)
 			{
-				pCell->SetCoords(row,col);
-                pCell->Draw(pDC, row, col, rect, FALSE);
+				//Used for merge cells
+				//by Huang Wei
+
+				if (!pCell->IsMerged())
+				{
+					if (!pCell->IsMergeWithOthers())
+					{
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, rect, FALSE);
+					}
+					else
+					{
+						CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID());
+						CRect mergerect = rect;
+						if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect))
+						{
+							mergerect.DeflateRect(0, 0, 1, 1);
+							pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col);
+							pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE);
+						}
+					}
+				}
+				else
+				{
+					CRect mergerect = rect;
+
+					if (GetCellRangeRect(pCell->m_MergeRange, &mergerect))
+					{
+						mergerect.DeflateRect(0, 0, 1, 1);
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, mergerect, TRUE);
+					}
+				}
 			}
-        }
-    }
+		}
+	}
 
-    // draw fixed column cells:  m_nFixedRows..n, 0..m_nFixedCols-1
-    rect.bottom = nFixedRowHeight-1;
-    for (row = minVisibleRow; row <= maxVisibleRow; row++)
-    {
-        if (GetRowHeight(row) <= 0) continue;
+	// draw fixed column cells:  m_nFixedRows..n, 0..m_nFixedCols-1
+	rect.bottom = nFixedRowHeight - 1;
+	for (row = minVisibleRow; row <= maxVisibleRow; row++)
+	{
+		if (GetRowHeight(row) <= 0) continue;
 
-        rect.top = rect.bottom+1;
-        rect.bottom = rect.top + GetRowHeight(row)-1;
+		rect.top = rect.bottom + 1;
+		rect.bottom = rect.top + GetRowHeight(row) - 1;
 
-        // rect.bottom = bottom pixel of previous row
-        if (rect.top > clipRect.bottom)
-            break;                // Gone past cliprect
-        if (rect.bottom < clipRect.top)
-            continue;             // Reached cliprect yet?
+		// rect.bottom = bottom pixel of previous row
+		if (rect.top > clipRect.bottom)
+			break;                // Gone past cliprect
+		if (rect.bottom < clipRect.top)
+			continue;             // Reached cliprect yet?
 
-        rect.right = -1;
-        for (col = 0; col < m_nFixedCols; col++)
-        {
-            if (GetColumnWidth(col) <= 0) continue;
+		rect.right = -1;
+		for (col = 0; col < m_nFixedCols; col++)
+		{
+			if (GetColumnWidth(col) <= 0) continue;
 
-            rect.left = rect.right+1;
-            rect.right = rect.left + GetColumnWidth(col)-1;
+			rect.left = rect.right + 1;
+			rect.right = rect.left + GetColumnWidth(col) - 1;
 
-            if (rect.left > clipRect.right)
-                break;            // gone past cliprect
-            if (rect.right < clipRect.left)
-                continue;         // Reached cliprect yet?
+			if (rect.left > clipRect.right)
+				break;            // gone past cliprect
+			if (rect.right < clipRect.left)
+				continue;         // Reached cliprect yet?
 
-            pCell = GetCell(row, col);
-            if (pCell)
+			pCell = GetCell(row, col);
+			//         if (pCell)
+					 //{
+					 //	pCell->SetCoords(row,col);
+			//             pCell->Draw(pDC, row, col, rect, TRUE);
+					 //}
+			if (pCell)
 			{
-				pCell->SetCoords(row,col);
-                pCell->Draw(pDC, row, col, rect, FALSE);
+				//Used for merge cells
+				//by Huang Wei
+
+				if (!pCell->IsMerged())
+				{
+					if (!pCell->IsMergeWithOthers())
+					{
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, rect, FALSE);
+					}
+					else
+					{
+						CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID());
+						CRect mergerect = rect;
+						if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect))
+						{
+							mergerect.DeflateRect(0, 0, 1, 1);
+							pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col);
+							pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE);
+						}
+					}
+				}
+				else
+				{
+					CRect mergerect = rect;
+
+					if (GetCellRangeRect(pCell->m_MergeRange, &mergerect))
+					{
+						mergerect.DeflateRect(0, 0, 1, 1);
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, mergerect, TRUE);
+					}
+				}
 			}
-        }
-    }
+		}
+	}
 
-    // draw fixed row cells  0..m_nFixedRows, m_nFixedCols..n
-    rect.bottom = -1;
-    for (row = 0; row < m_nFixedRows; row++)
-    {
-        if (GetRowHeight(row) <= 0) continue;
+	// draw fixed row cells  0..m_nFixedRows, m_nFixedCols..n
+	rect.bottom = -1;
+	for (row = 0; row < m_nFixedRows; row++)
+	{
+		if (GetRowHeight(row) <= 0) continue;
 
-        rect.top = rect.bottom+1;
-        rect.bottom = rect.top + GetRowHeight(row)-1;
+		rect.top = rect.bottom + 1;
+		rect.bottom = rect.top + GetRowHeight(row) - 1;
 
-        // rect.bottom = bottom pixel of previous row
-        if (rect.top > clipRect.bottom)
-            break;                // Gone past cliprect
-        if (rect.bottom < clipRect.top)
-            continue;             // Reached cliprect yet?
+		// rect.bottom = bottom pixel of previous row
+		if (rect.top > clipRect.bottom)
+			break;                // Gone past cliprect
+		if (rect.bottom < clipRect.top)
+			continue;             // Reached cliprect yet?
 
-        rect.right = nFixedColWidth-1;
-        for (col = minVisibleCol; col <= maxVisibleCol; col++)
-        {
-            if (GetColumnWidth(col) <= 0) continue;
+		rect.right = nFixedColWidth - 1;
+		for (col = minVisibleCol; col <= maxVisibleCol; col++)
+		{
+			if (GetColumnWidth(col) <= 0) continue;
 
-            rect.left = rect.right+1;
-            rect.right = rect.left + GetColumnWidth(col)-1;
+			rect.left = rect.right + 1;
+			rect.right = rect.left + GetColumnWidth(col) - 1;
 
-            if (rect.left > clipRect.right)
-                break;        // gone past cliprect
-            if (rect.right < clipRect.left)
-                continue;     // Reached cliprect yet?
+			if (rect.left > clipRect.right)
+				break;        // gone past cliprect
+			if (rect.right < clipRect.left)
+				continue;     // Reached cliprect yet?
 
-            pCell = GetCell(row, col);
-            if (pCell)
+			pCell = GetCell(row, col);
+			//         if (pCell)
+					 //{
+					 //	pCell->SetCoords(row,col);
+			//             pCell->Draw(pDC, row, col, rect, TRUE);
+					 //}
+			if (pCell)
 			{
-				pCell->SetCoords(row,col);
-                pCell->Draw(pDC, row, col, rect, FALSE);
+				//Used for merge cells
+				//by Huang Wei
+
+				if (!pCell->IsMerged())
+				{
+					if (!pCell->IsMergeWithOthers())
+					{
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, rect, FALSE);
+					}
+					else
+					{
+						CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID());
+						CRect mergerect = rect;
+						if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect))
+						{
+							mergerect.DeflateRect(0, 0, 1, 1);
+							pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col);
+							pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE);
+						}
+					}
+				}
+				else
+				{
+					CRect mergerect = rect;
+
+					if (GetCellRangeRect(pCell->m_MergeRange, &mergerect))
+					{
+						mergerect.DeflateRect(0, 0, 1, 1);
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, mergerect, TRUE);
+					}
+				}
 			}
-        }
-    }
+		}
+	}
+	/*
+		// draw top-left cells 0..m_nFixedRows-1, 0..m_nFixedCols-1
+		rect.bottom = -1;
+		for (row = 0; row < m_nFixedRows; row++)
+		{
+			if (GetRowHeight(row) <= 0) continue;
 
-    // draw rest of non-fixed cells
-    rect.bottom = nFixedRowHeight-1;
-    for (row = minVisibleRow; row <= maxVisibleRow; row++)
-    {
-        if (GetRowHeight(row) <= 0) continue;
+			rect.top = rect.bottom+1;
+			rect.bottom = rect.top + GetRowHeight(row)-1;
+			rect.right = -1;
 
-        rect.top = rect.bottom+1;
-        rect.bottom = rect.top + GetRowHeight(row)-1;
-
-        // rect.bottom = bottom pixel of previous row
-        if (rect.top > clipRect.bottom)
-            break;                // Gone past cliprect
-        if (rect.bottom < clipRect.top)
-            continue;             // Reached cliprect yet?
-
-        rect.right = nFixedColWidth-1;
-        for (col = minVisibleCol; col <= maxVisibleCol; col++)
-        {
-            if (GetColumnWidth(col) <= 0) continue;
-
-            rect.left = rect.right+1;
-            rect.right = rect.left + GetColumnWidth(col)-1;
-
-            if (rect.left > clipRect.right)
-                break;        // gone past cliprect
-            if (rect.right < clipRect.left)
-                continue;     // Reached cliprect yet?
-
-            pCell = GetCell(row, col);
-            // TRACE(_T("Cell %d,%d type: %s\n"), row, col, pCell->GetRuntimeClass()->m_lpszClassName);
-            if (pCell)
+			for (col = 0; col < m_nFixedCols; col++)
 			{
-				pCell->SetCoords(row,col);
-                pCell->Draw(pDC, row, col, rect, FALSE);
+				if (GetColumnWidth(col) <= 0) continue;
+
+				rect.left = rect.right+1;
+				rect.right = rect.left + GetColumnWidth(col)-1;
+
+				pCell = GetCell(row, col);
+				if (pCell)
+				{
+					pCell->SetCoords(row,col);
+					pCell->Draw(pDC, row, col, rect, FALSE);
+				}
 			}
-        }
-    }
+		}
+	*/
+	// draw top-left cells 0..m_nFixedRows-1, 0..m_nFixedCols-1
+	rect.bottom = -1;
+	for (row = 0; row < m_nFixedRows; row++)
+	{
+		if (GetRowHeight(row) <= 0) continue;
 
+		rect.top = rect.bottom + 1;
+		rect.bottom = rect.top + GetRowHeight(row) - 1;
+		rect.right = -1;
 
-    CPen pen;
-    pen.CreatePen(PS_SOLID, 0, m_crGridLineColour);
-    pDC->SelectObject(&pen);
+		for (col = 0; col < m_nFixedCols; col++)
+		{
+			if (GetColumnWidth(col) <= 0) continue;
 
-    // draw vertical lines (drawn at ends of cells)
-    if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_VERT)
-    {
-        int x = nFixedColWidth;
-        for (col = minVisibleCol; col <= maxVisibleCol; col++)
-        {
-            if (GetColumnWidth(col) <= 0) continue;
+			rect.left = rect.right + 1;
+			rect.right = rect.left + GetColumnWidth(col) - 1;
 
-            x += GetColumnWidth(col);
-            pDC->MoveTo(x-1, nFixedRowHeight);
-            pDC->LineTo(x-1, VisRect.bottom);
-        }
-    }
+			pCell = GetCell(row, col);
+			/* if (pCell)
+			{
+			pCell->SetCoords(row,col);
+			pCell->Draw(pDC, row, col, rect, FALSE);
+			}*/
+			if (pCell)
+			{
+				//Used for merge cells by Huang Wei
+				//bugfix by Luther Bruck
 
-    // draw horizontal lines (drawn at bottom of each cell)
-    if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_HORZ)
-    {
-        int y = nFixedRowHeight;
-        for (row = minVisibleRow; row <= maxVisibleRow; row++)
-        {
-            if (GetRowHeight(row) <= 0) continue;
+				if (!pCell->IsMerged())
+				{
+					if (!pCell->IsMergeWithOthers())
+					{
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, rect, FALSE);
+					}
+					else
+					{
+						CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID());
+						CRect mergerect = rect;
+						if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect))
+						{
+							mergerect.DeflateRect(0, 0, 1, 1);
+							pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col);
+							pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE);
+						}
+					}
+				}
+				else
+				{
+					CRect mergerect = rect;
 
-            y += GetRowHeight(row);
-            pDC->MoveTo(nFixedColWidth, y-1);
-            pDC->LineTo(VisRect.right,  y-1);
-        }
-    }
+					if (GetCellRangeRect(pCell->m_MergeRange, &mergerect))
+					{
+						mergerect.DeflateRect(0, 0, 1, 1);
+						pCell->SetCoords(row, col);
+						pCell->Draw(pDC, row, col, mergerect, TRUE);
+					}
+				}
+			}
+		}
+	}
 
-    pDC->SelectStockObject(NULL_PEN);
 
     // Let parent know it can discard it's data if it needs to.
     if (GetVirtualMode())
@@ -2863,7 +3052,7 @@
     if (!GetCellOrigin(idCurrentCell, &start))
         return FALSE;
 
-    int endy = start.y + GetRowHeight(idCurrentCell.row);
+	int endy = start.y + GetMergeCellHeight(idCurrentCell);
 
     if ((point.y - start.y < m_nResizeCaptureRange && idCurrentCell.row != 0) ||
         endy - point.y < m_nResizeCaptureRange)
@@ -2885,7 +3074,7 @@
     if (!GetCellOrigin(idCurrentCell, &start))
         return FALSE;
 
-    int endx = start.x + GetColumnWidth(idCurrentCell.col);
+	int endx = start.x + GetMergeCellWidth(idCurrentCell);
 
     if ((point.x - start.x < m_nResizeCaptureRange && idCurrentCell.col != 0) ||
         endx - point.x < m_nResizeCaptureRange)
@@ -2977,7 +3166,8 @@
             cellID.row = -1;
         else
             cellID.row = row;
-    }
+	}
+	cellID = GetMergeCellID(cellID);
     return cellID;
 }
 
@@ -3368,9 +3558,12 @@
     if (nCol >= m_nFixedCols || nRow >= m_nFixedRows)
         idTopLeft = GetTopleftNonFixedCell();
 
-    if ((nRow >= m_nFixedRows && nRow < idTopLeft.row) ||
-        (nCol>= m_nFixedCols && nCol < idTopLeft.col))
-        return FALSE;
+	//Merge the selected cells 
+	//by Huang Wei
+
+    //if ((nRow >= m_nFixedRows && nRow < idTopLeft.row) ||
+    //    (nCol>= m_nFixedCols && nCol < idTopLeft.col))
+    //    return FALSE;
 
     p->x = 0;
     if (nCol < m_nFixedCols)                      // is a fixed column
@@ -3380,8 +3573,18 @@
         {                                        // is a scrollable data column
             for (i = 0; i < m_nFixedCols; i++)
                 p->x += GetColumnWidth(i);
-            for (i = idTopLeft.col; i < nCol; i++)
-                p->x += GetColumnWidth(i);
+			//Merge the selected cells 
+			//by Huang Wei
+			if(nCol>idTopLeft.col)
+			{
+				for (i = idTopLeft.col; i < nCol; i++)
+					p->x += GetColumnWidth(i);
+			}
+			else
+			{
+				for (i = nCol; i <idTopLeft.col ; i++)
+					p->x -= GetColumnWidth(i);
+			}
         }
         
         p->y = 0;
@@ -3392,11 +3595,64 @@
             {                                        // is a scrollable data row
                 for (i = 0; i < m_nFixedRows; i++)
                     p->y += GetRowHeight(i);
-                for (i = idTopLeft.row; i < nRow; i++)
-                    p->y += GetRowHeight(i);
+ 				//Merge the selected cells 
+				//by Huang Wei
+				if(nRow>idTopLeft.row)
+				{
+					for (i = idTopLeft.row; i < nRow; i++)
+						p->y += GetRowHeight(i);
+				}
+				else
+				{
+					for (i = nRow; i <idTopLeft.row; i++)
+						p->y -= GetRowHeight(i);
+				}
             }
             
             return TRUE;
+}
+// returns the top left point of the cell. Returns FALSE if cell not visible.
+// don't consider cell's merge
+BOOL CGridCtrl::GetCellOriginNoMerge(int nRow, int nCol, LPPOINT p)
+{
+	int i;
+
+	if (!IsValid(nRow, nCol))
+		return FALSE;
+
+	CCellID idTopLeft;
+	if (nCol >= m_nFixedCols || nRow >= m_nFixedRows)
+		idTopLeft = GetTopleftNonFixedCell();
+
+    if ((nRow >= m_nFixedRows && nRow < idTopLeft.row) ||
+        (nCol>= m_nFixedCols && nCol < idTopLeft.col))
+        return FALSE;
+
+    p->x = 0;
+    if (nCol < m_nFixedCols)                      // is a fixed column
+        for (i = 0; i < nCol; i++)
+            p->x += GetColumnWidth(i);
+    else 
+    {                                        // is a scrollable data column
+        for (i = 0; i < m_nFixedCols; i++)
+            p->x += GetColumnWidth(i);
+        for (i = idTopLeft.col; i < nCol; i++)
+            p->x += GetColumnWidth(i);
+    }
+    
+    p->y = 0;
+    if (nRow < m_nFixedRows)                      // is a fixed row
+        for (i = 0; i < nRow; i++)
+            p->y += GetRowHeight(i);
+    else 
+    {                                        // is a scrollable data row
+        for (i = 0; i < m_nFixedRows; i++)
+            p->y += GetRowHeight(i);
+        for (i = idTopLeft.row; i < nRow; i++)
+            p->y += GetRowHeight(i);
+    }
+    
+    return TRUE;
 }
 
 BOOL CGridCtrl::GetCellOrigin(const CCellID& cell, LPPOINT p)
@@ -3416,11 +3672,21 @@
     if (!GetCellOrigin(nRow, nCol, &CellOrigin))
         return FALSE;
 
-    pRect->left   = CellOrigin.x;
-    pRect->top    = CellOrigin.y;
-    pRect->right  = CellOrigin.x + GetColumnWidth(nCol)-1;
-    pRect->bottom = CellOrigin.y + GetRowHeight(nRow)-1;
-
+    //Merge the selected cells 
+    //by Huang Wei
+    CGridCellBase *pCell = (CGridCellBase*) GetCell(nRow,nCol);
+	
+	if(!pCell->IsMerged())
+	{
+		pRect->left   = CellOrigin.x;
+		pRect->top    = CellOrigin.y;
+		pRect->right  = CellOrigin.x + GetColumnWidth(nCol)-1;
+		pRect->bottom = CellOrigin.y + GetRowHeight(nRow)-1;
+	}
+	else
+	{
+		GetCellRangeRect(pCell->m_MergeRange,pRect);
+	}
     //TRACE("Row %d, col %d: L %d, T %d, W %d, H %d:  %d,%d - %d,%d\n",
     //      nRow,nCol, CellOrigin.x, CellOrigin.y, GetColumnWidth(nCol), GetRowHeight(nRow),
     //      pRect->left, pRect->top, pRect->right, pRect->bottom);
@@ -6481,12 +6747,18 @@
         if (m_LeftClickDownPoint != point  && (point.x != 0 || point.y != 0)) // 0 pt fix by email1@bierling.net
         {
             CPoint start;
+			//Used for merge cells
+			//by Huang Wei
+			m_LeftClickDownCell=GetMergeCellID(m_LeftClickDownCell);
             if (!GetCellOrigin(m_LeftClickDownCell, &start))
                 return;
             
-            int nRowHeight = __max(point.y - start.y, m_bAllowRowHide? 0 : 1);
+            int nRowHeight = max(point.y - start.y, m_bAllowRowHide? 0 : 1);
+			//Used for merge cells
+			//by Huang Wei
+			int mergeheight=GetMergeCellHeight(m_LeftClickDownCell)-GetRowHeight(m_LeftClickDownCell.row);
 
-            SetRowHeight(m_LeftClickDownCell.row, nRowHeight);
+            SetRowHeight(m_LeftClickDownCell.row, nRowHeight-mergeheight);
             ResetScrollBars();
             Invalidate();
         }
@@ -7600,6 +7872,45 @@
 
 }
 
+
+void CGridCtrl::MergeCells(int nStartRow, int nStartCol, int nEndRow, int nEndCol)
+{
+	for(int row=nStartRow;row<=nEndRow;row++)
+	{
+		for(int col=nStartCol;col<=nEndCol;col++)
+		{
+		    CGridCellBase *pCell = (CGridCellBase*) GetCell(row,col);
+			pCell->Show(FALSE);
+			if(row==nStartRow && col==nStartCol)
+			{
+				CCellRange range(nStartRow,  nStartCol,  nEndRow,  nEndCol);
+				pCell->SetMergeRange(range);
+			}
+			else
+			{
+				CCellID cell(nStartRow,nStartCol);
+				pCell->SetMergeCellID(cell);
+			}
+
+		}
+	}
+	Invalidate();
+}
+
+int CGridCtrl::GetMergeCellWidth(CCellID cell)
+{
+	CCellID mergecell = GetMergeCellID(cell);
+	CGridCellBase *pCell = (CGridCellBase*)GetCell(mergecell);
+	if (!pCell->IsMerged())
+		return GetColumnWidth(cell.col);
+	int width = 0;
+	for (int mergecol = pCell->GetMergeRange().GetMaxCol();mergecol >= pCell->GetMergeRange().GetMinCol();mergecol--)
+	{
+		width += GetColumnWidth(mergecol);
+	}
+	return width;
+}
+
 void CGridCtrl::OnKillFocus(CWnd* pNewWnd)
 {
 	CWnd::OnKillFocus(pNewWnd);
diff --git a/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj b/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj
index 4b8e58f..ec4133d 100644
--- a/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj
+++ b/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj
@@ -164,10 +164,10 @@
     <None Include="ReadMe.txt" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="MotorCalculator.h" />
-    <ClInclude Include="MotorCalibrator.h" />
+    <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalculator.h" />
+    <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalibrator.h" />
+    <ClInclude Include="..\Include\CHMotorCalibrator\SPosition2D.h" />
     <ClInclude Include="Resource.h" />
-    <ClInclude Include="SPosition2D.h" />
     <ClInclude Include="stdafx.h" />
     <ClInclude Include="targetver.h" />
   </ItemGroup>
diff --git a/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj.filters b/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj.filters
index 8775d5b..59f7b80 100644
--- a/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj.filters
+++ b/Internal_Library/CHMotorCalibrator/CHMotorCalibrator.vcxproj.filters
@@ -41,16 +41,7 @@
     <None Include="ReadMe.txt" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="MotorCalculator.h">
-      <Filter>�뿤�뜑 �뙆�씪</Filter>
-    </ClInclude>
-    <ClInclude Include="MotorCalibrator.h">
-      <Filter>�뿤�뜑 �뙆�씪</Filter>
-    </ClInclude>
     <ClInclude Include="Resource.h">
-      <Filter>�뿤�뜑 �뙆�씪</Filter>
-    </ClInclude>
-    <ClInclude Include="SPosition2D.h">
       <Filter>�뿤�뜑 �뙆�씪</Filter>
     </ClInclude>
     <ClInclude Include="stdafx.h">
@@ -59,6 +50,15 @@
     <ClInclude Include="targetver.h">
       <Filter>�뿤�뜑 �뙆�씪</Filter>
     </ClInclude>
+    <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalculator.h">
+      <Filter>�뿤�뜑 �뙆�씪</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalibrator.h">
+      <Filter>�뿤�뜑 �뙆�씪</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\CHMotorCalibrator\SPosition2D.h">
+      <Filter>�뿤�뜑 �뙆�씪</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="CHMotorCalibrator.rc">
diff --git a/Internal_Library/Include/CHCommonControls/GridCell.h b/Internal_Library/Include/CHCommonControls/GridCell.h
index 324233a..75117a7 100644
--- a/Internal_Library/Include/CHCommonControls/GridCell.h
+++ b/Internal_Library/Include/CHCommonControls/GridCell.h
@@ -48,7 +48,7 @@
 
 // Attributes
 public:
-    void operator=(const CGridCell& cell);
+    void operator=(CGridCell& cell);
 
     virtual void  SetText(LPCTSTR szText)        { m_strText = szText;  }                       
     virtual void  SetImage(int nImage)           { m_nImage = nImage;   }                        
diff --git a/Internal_Library/Include/CHCommonControls/GridCellBase.h b/Internal_Library/Include/CHCommonControls/GridCellBase.h
index 6f181bd..957f7df 100644
--- a/Internal_Library/Include/CHCommonControls/GridCellBase.h
+++ b/Internal_Library/Include/CHCommonControls/GridCellBase.h
@@ -28,6 +28,7 @@
 #if _MSC_VER >= 1000
 #pragma once
 #endif // _MSC_VER >= 1000
+#include "CellRange.h"
 
 class CGridCtrl;
 
@@ -127,10 +128,13 @@
 
 // Operators
 public:
-    virtual void operator=(const CGridCellBase& cell);
+    virtual void operator=(CGridCellBase& cell);
 
 // Operations
 public:
+	virtual bool IsMerged();
+	virtual void SetMergeRange(CCellRange range);
+	virtual void Show(bool IsShow);
     virtual void Reset();
 
     virtual BOOL Draw(CDC* pDC, int nRow, int nCol, CRect rect, BOOL bEraseBkgnd = TRUE);
@@ -162,8 +166,21 @@
     virtual void OnDblClick( CPoint PointCellRelative);
     virtual BOOL OnSetCursor();
 
+public:
+	void UnMerge();
+	virtual bool IsShow();
+	virtual CCellRange GetMergeRange();
+	virtual bool IsMergeWithOthers();
+	virtual CCellID GetMergeCellID();
+	virtual void SetMergeCellID(CCellID cell);
 protected:
     DWORD    m_nState;      // Cell state (selected/focus etc)
+
+private:
+	CCellRange m_MergeRange;
+	bool m_IsMergeWithOthers;
+	CCellID m_MergeCellID;
+	bool m_Hide;
 };
 
 //{{AFX_INSERT_LOCATION}}
diff --git a/Internal_Library/Include/CHCommonControls/GridCtrl.h b/Internal_Library/Include/CHCommonControls/GridCtrl.h
index bdbac1f..5d79e17 100644
--- a/Internal_Library/Include/CHCommonControls/GridCtrl.h
+++ b/Internal_Library/Include/CHCommonControls/GridCtrl.h
@@ -190,6 +190,10 @@
     friend class CGridCell;
     friend class CGridCellBase;
 
+public:
+	CCellID GetMergeCellID(CCellID cell);
+	int  GetMergeCellHeight(CCellID cell);
+
 // Construction
 public:
     CGridCtrl(int nRows = 0, int nCols = 0, int nFixedRows = 0, int nFixedCols = 0);
@@ -215,7 +219,8 @@
     int  GetColumnWidth(int nCol) const;
     BOOL SetColumnWidth(int col, int width);
 
-    BOOL GetCellOrigin(int nRow, int nCol, LPPOINT p);
+	BOOL GetCellOrigin(int nRow, int nCol, LPPOINT p);
+	BOOL GetCellOriginNoMerge(int nRow, int nCol, LPPOINT p);
     BOOL GetCellOrigin(const CCellID& cell, LPPOINT p);
     BOOL GetCellRect(int nRow, int nCol, LPRECT pRect);
     BOOL GetCellRect(const CCellID& cell, LPRECT pRect);
@@ -359,7 +364,8 @@
 // Grid cell Attributes
 ///////////////////////////////////////////////////////////////////////////////////
 public:
-    CGridCellBase* GetCell(int nRow, int nCol) const;   // Get the actual cell!
+	CGridCellBase* GetCell(int nRow, int nCol) const;   // Get the actual cell!
+	CGridCellBase* CGridCtrl::GetCell(CCellID cell);
 
     void SetModified(BOOL bModified = TRUE, int nRow = -1, int nCol = -1);
     BOOL GetModified(int nRow = -1, int nCol = -1);
@@ -817,6 +823,8 @@
 	bool m_AllowSelectRowInFixedCol;
 
 public:
+	void MergeCells(int nStartRow, int nStartCol, int nEndRow, int nEndCol);
+	int  GetMergeCellWidth(CCellID cell);
 	afx_msg void OnKillFocus(CWnd* pNewWnd);
 };
 
@@ -888,6 +896,11 @@
     return pRow->GetAt(m_arColOrder[nCol]);
 }
 
+inline CGridCellBase * CGridCtrl::GetCell(CCellID cell)
+{
+	return GetCell(cell.row, cell.col);
+}
+
 inline BOOL CGridCtrl::SetCell(int nRow, int nCol, CGridCellBase* pCell)
 {
     if (GetVirtualMode())
diff --git a/Internal_Library/bin/CHAutoLightControls_x64_vc15.dll b/Internal_Library/bin/CHAutoLightControls_x64_vc15.dll
index f710ce7..04cc84c 100644
--- a/Internal_Library/bin/CHAutoLightControls_x64_vc15.dll
+++ b/Internal_Library/bin/CHAutoLightControls_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHAutoLightControls_x64_vc15.pdb b/Internal_Library/bin/CHAutoLightControls_x64_vc15.pdb
index 3f0ac35..081449e 100644
--- a/Internal_Library/bin/CHAutoLightControls_x64_vc15.pdb
+++ b/Internal_Library/bin/CHAutoLightControls_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.dll b/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.dll
index 443f66a..4ef2324 100644
--- a/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.dll
+++ b/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.pdb b/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.pdb
index 865ef26..4765fa1 100644
--- a/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHAutoLightControlsd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHCameraViewer_x64_vc15.dll b/Internal_Library/bin/CHCameraViewer_x64_vc15.dll
index 23e29c3..653a72a 100644
--- a/Internal_Library/bin/CHCameraViewer_x64_vc15.dll
+++ b/Internal_Library/bin/CHCameraViewer_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHCameraViewer_x64_vc15.pdb b/Internal_Library/bin/CHCameraViewer_x64_vc15.pdb
index c4d99ff..c7acdfa 100644
--- a/Internal_Library/bin/CHCameraViewer_x64_vc15.pdb
+++ b/Internal_Library/bin/CHCameraViewer_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHCameraViewerd_x64_vc15.dll b/Internal_Library/bin/CHCameraViewerd_x64_vc15.dll
index 4353d27..97819b4 100644
--- a/Internal_Library/bin/CHCameraViewerd_x64_vc15.dll
+++ b/Internal_Library/bin/CHCameraViewerd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHCameraViewerd_x64_vc15.pdb b/Internal_Library/bin/CHCameraViewerd_x64_vc15.pdb
index 1df2911..9487c7e 100644
--- a/Internal_Library/bin/CHCameraViewerd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHCameraViewerd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHCommonControls_x64_vc15.dll b/Internal_Library/bin/CHCommonControls_x64_vc15.dll
index d51210d..eb3c17c 100644
--- a/Internal_Library/bin/CHCommonControls_x64_vc15.dll
+++ b/Internal_Library/bin/CHCommonControls_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHCommonControls_x64_vc15.pdb b/Internal_Library/bin/CHCommonControls_x64_vc15.pdb
index 1289763..ef47317 100644
--- a/Internal_Library/bin/CHCommonControls_x64_vc15.pdb
+++ b/Internal_Library/bin/CHCommonControls_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHCommonControlsd_x64_vc15.dll b/Internal_Library/bin/CHCommonControlsd_x64_vc15.dll
index dc6c714..1c2ab94 100644
--- a/Internal_Library/bin/CHCommonControlsd_x64_vc15.dll
+++ b/Internal_Library/bin/CHCommonControlsd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHCommonControlsd_x64_vc15.pdb b/Internal_Library/bin/CHCommonControlsd_x64_vc15.pdb
index a3d31bf..df40e91 100644
--- a/Internal_Library/bin/CHCommonControlsd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHCommonControlsd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHEdgeTriangle_x64_vc15.dll b/Internal_Library/bin/CHEdgeTriangle_x64_vc15.dll
index f805905..f22f069 100644
--- a/Internal_Library/bin/CHEdgeTriangle_x64_vc15.dll
+++ b/Internal_Library/bin/CHEdgeTriangle_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHEdgeTriangle_x64_vc15.pdb b/Internal_Library/bin/CHEdgeTriangle_x64_vc15.pdb
index 0f0c56a..1ca3a49 100644
--- a/Internal_Library/bin/CHEdgeTriangle_x64_vc15.pdb
+++ b/Internal_Library/bin/CHEdgeTriangle_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHEdgeTriangled_x64_vc15.dll b/Internal_Library/bin/CHEdgeTriangled_x64_vc15.dll
index 9f77929..b4ea66f 100644
--- a/Internal_Library/bin/CHEdgeTriangled_x64_vc15.dll
+++ b/Internal_Library/bin/CHEdgeTriangled_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHEdgeTriangled_x64_vc15.pdb b/Internal_Library/bin/CHEdgeTriangled_x64_vc15.pdb
index 7a1fc21..52e87e2 100644
--- a/Internal_Library/bin/CHEdgeTriangled_x64_vc15.pdb
+++ b/Internal_Library/bin/CHEdgeTriangled_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHFolderMonitoring_x64_vc15.dll b/Internal_Library/bin/CHFolderMonitoring_x64_vc15.dll
index 31bfcc4..a6e48bd 100644
--- a/Internal_Library/bin/CHFolderMonitoring_x64_vc15.dll
+++ b/Internal_Library/bin/CHFolderMonitoring_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHFolderMonitoring_x64_vc15.pdb b/Internal_Library/bin/CHFolderMonitoring_x64_vc15.pdb
index 586e41a..d7e093a 100644
--- a/Internal_Library/bin/CHFolderMonitoring_x64_vc15.pdb
+++ b/Internal_Library/bin/CHFolderMonitoring_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.dll b/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.dll
index f227709..0aad215 100644
--- a/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.dll
+++ b/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.pdb b/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.pdb
index 6dee1ca..f596300 100644
--- a/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHFolderMonitoringd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHImageMerger_x64_vc15.dll b/Internal_Library/bin/CHImageMerger_x64_vc15.dll
index 7b6cc1f..da8768a 100644
--- a/Internal_Library/bin/CHImageMerger_x64_vc15.dll
+++ b/Internal_Library/bin/CHImageMerger_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHImageMerger_x64_vc15.pdb b/Internal_Library/bin/CHImageMerger_x64_vc15.pdb
index 9849ecc..e107ba1 100644
--- a/Internal_Library/bin/CHImageMerger_x64_vc15.pdb
+++ b/Internal_Library/bin/CHImageMerger_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHImageMergerd_x64_vc15.dll b/Internal_Library/bin/CHImageMergerd_x64_vc15.dll
new file mode 100644
index 0000000..a0b0585
--- /dev/null
+++ b/Internal_Library/bin/CHImageMergerd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHImageMergerd_x64_vc15.pdb b/Internal_Library/bin/CHImageMergerd_x64_vc15.pdb
new file mode 100644
index 0000000..28549a1
--- /dev/null
+++ b/Internal_Library/bin/CHImageMergerd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHImageReSampler_x64_vc15.dll b/Internal_Library/bin/CHImageReSampler_x64_vc15.dll
index 3d4d8c4..aebb594 100644
--- a/Internal_Library/bin/CHImageReSampler_x64_vc15.dll
+++ b/Internal_Library/bin/CHImageReSampler_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHImageReSampler_x64_vc15.pdb b/Internal_Library/bin/CHImageReSampler_x64_vc15.pdb
index bba356c..9f2df60 100644
--- a/Internal_Library/bin/CHImageReSampler_x64_vc15.pdb
+++ b/Internal_Library/bin/CHImageReSampler_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHImageReSamplerd_x64_vc15.dll b/Internal_Library/bin/CHImageReSamplerd_x64_vc15.dll
index b9d3842..a66dc99 100644
--- a/Internal_Library/bin/CHImageReSamplerd_x64_vc15.dll
+++ b/Internal_Library/bin/CHImageReSamplerd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHImageReSamplerd_x64_vc15.pdb b/Internal_Library/bin/CHImageReSamplerd_x64_vc15.pdb
index 49e7a8a..760fbdc 100644
--- a/Internal_Library/bin/CHImageReSamplerd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHImageReSamplerd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHMotorCalibrator_x64_vc15.dll b/Internal_Library/bin/CHMotorCalibrator_x64_vc15.dll
index 6ec02f4..58bd58e 100644
--- a/Internal_Library/bin/CHMotorCalibrator_x64_vc15.dll
+++ b/Internal_Library/bin/CHMotorCalibrator_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHMotorCalibrator_x64_vc15.pdb b/Internal_Library/bin/CHMotorCalibrator_x64_vc15.pdb
index cd9259c..7dad3e0 100644
--- a/Internal_Library/bin/CHMotorCalibrator_x64_vc15.pdb
+++ b/Internal_Library/bin/CHMotorCalibrator_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHMotorCalibratord_x64_vc15.dll b/Internal_Library/bin/CHMotorCalibratord_x64_vc15.dll
index 6151204..282ad12 100644
--- a/Internal_Library/bin/CHMotorCalibratord_x64_vc15.dll
+++ b/Internal_Library/bin/CHMotorCalibratord_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHMotorCalibratord_x64_vc15.pdb b/Internal_Library/bin/CHMotorCalibratord_x64_vc15.pdb
index 03afe60..dc9e461 100644
--- a/Internal_Library/bin/CHMotorCalibratord_x64_vc15.pdb
+++ b/Internal_Library/bin/CHMotorCalibratord_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.dll b/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.dll
index 42bf3c4..f066edb 100644
--- a/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.dll
+++ b/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.pdb b/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.pdb
index 75540f0..e2734c4 100644
--- a/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.pdb
+++ b/Internal_Library/bin/CHNfsDriveRenewer_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.dll b/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.dll
index 4ef44e2..faba1c2 100644
--- a/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.dll
+++ b/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.pdb b/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.pdb
index 2488cbb..fdc1433 100644
--- a/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHNfsDriveRenewerd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHSignalControls_Network_x64_vc15.dll b/Internal_Library/bin/CHSignalControls_Network_x64_vc15.dll
index c2d2471..4fa5946 100644
--- a/Internal_Library/bin/CHSignalControls_Network_x64_vc15.dll
+++ b/Internal_Library/bin/CHSignalControls_Network_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHSignalControls_Network_x64_vc15.pdb b/Internal_Library/bin/CHSignalControls_Network_x64_vc15.pdb
index 32c5223..a06825f 100644
--- a/Internal_Library/bin/CHSignalControls_Network_x64_vc15.pdb
+++ b/Internal_Library/bin/CHSignalControls_Network_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.dll b/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.dll
index 2954509..9abc875 100644
--- a/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.dll
+++ b/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.pdb b/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.pdb
index 61f0c6e..a13c6af 100644
--- a/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHSignalControls_Networkd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.dll b/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.dll
index db4ed14..96f7bbd 100644
--- a/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.dll
+++ b/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.pdb b/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.pdb
index 32910f8..80679cc 100644
--- a/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.pdb
+++ b/Internal_Library/bin/CHVirtualGlassMap_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.dll b/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.dll
index ea32996..1de4a02 100644
--- a/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.dll
+++ b/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.pdb b/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.pdb
index 39640a8..3c375da 100644
--- a/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHVirtualGlassMapd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHWsiControls_x64_vc15.dll b/Internal_Library/bin/CHWsiControls_x64_vc15.dll
index efca0f6..4bca4e6 100644
--- a/Internal_Library/bin/CHWsiControls_x64_vc15.dll
+++ b/Internal_Library/bin/CHWsiControls_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHWsiControls_x64_vc15.pdb b/Internal_Library/bin/CHWsiControls_x64_vc15.pdb
index f55d145..0069d2b 100644
--- a/Internal_Library/bin/CHWsiControls_x64_vc15.pdb
+++ b/Internal_Library/bin/CHWsiControls_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/bin/CHWsiControlsd_x64_vc15.dll b/Internal_Library/bin/CHWsiControlsd_x64_vc15.dll
index d76cad8..0adf513 100644
--- a/Internal_Library/bin/CHWsiControlsd_x64_vc15.dll
+++ b/Internal_Library/bin/CHWsiControlsd_x64_vc15.dll
Binary files differ
diff --git a/Internal_Library/bin/CHWsiControlsd_x64_vc15.pdb b/Internal_Library/bin/CHWsiControlsd_x64_vc15.pdb
index f965f0d..920e7ef 100644
--- a/Internal_Library/bin/CHWsiControlsd_x64_vc15.pdb
+++ b/Internal_Library/bin/CHWsiControlsd_x64_vc15.pdb
Binary files differ
diff --git a/Internal_Library/lib/CHCommonControls_x64_vc15.lib b/Internal_Library/lib/CHCommonControls_x64_vc15.lib
index e34c869..fc75d7d 100644
--- a/Internal_Library/lib/CHCommonControls_x64_vc15.lib
+++ b/Internal_Library/lib/CHCommonControls_x64_vc15.lib
Binary files differ
diff --git a/Internal_Library/lib/CHCommonControlsd_x64_vc15.lib b/Internal_Library/lib/CHCommonControlsd_x64_vc15.lib
index 8e58250..fc37aae 100644
--- a/Internal_Library/lib/CHCommonControlsd_x64_vc15.lib
+++ b/Internal_Library/lib/CHCommonControlsd_x64_vc15.lib
Binary files differ
diff --git a/Internal_Library/lib/CHImageMergerd_x64_vc15.lib b/Internal_Library/lib/CHImageMergerd_x64_vc15.lib
new file mode 100644
index 0000000..147f88d
--- /dev/null
+++ b/Internal_Library/lib/CHImageMergerd_x64_vc15.lib
Binary files differ
diff --git a/ReviewSystem/ReviewSystem/DlgLogo.cpp b/ReviewSystem/ReviewSystem/DlgLogo.cpp
index 299813c..2beed4e 100644
--- a/ReviewSystem/ReviewSystem/DlgLogo.cpp
+++ b/ReviewSystem/ReviewSystem/DlgLogo.cpp
@@ -50,6 +50,7 @@
 ON_BN_CLICKED(IDC_BUTTON5, &CDlgLogo::OnBnClickedButton5)
 ON_BN_CLICKED(IDC_BUTTON6, &CDlgLogo::OnClickedButton6)
 ON_BN_CLICKED(IDC_BUTTON_HW_SETTING_MODE, &CDlgLogo::OnBnClickedButtonHwSettingMode)
+ON_BN_CLICKED(IDC_BUTTON_MOTOR_OFFSET_TOOL, &CDlgLogo::OnBnClickedButtonMotorOffsetTool)
 END_MESSAGE_MAP()
 
 
@@ -309,3 +310,10 @@
 	g_pLog->DisplayMessage(_T("[ReviewProcessor] HW SettingMode Start"));
 	// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
 }
+/* < KEJ 20230621 - #4528 ADD Start > */
+void CDlgLogo::OnBnClickedButtonMotorOffsetTool()
+{
+	m_pDL2P->IDL2P_OpenMotorOffSetTool();
+	g_pLog->DisplayMessage(_T("[ReviewProcessor] Motor Offset Open"));
+}
+/* < KEJ 20230621 - #4528 ADD End > */
diff --git a/ReviewSystem/ReviewSystem/DlgLogo.h b/ReviewSystem/ReviewSystem/DlgLogo.h
index 2673230..ff89526 100644
--- a/ReviewSystem/ReviewSystem/DlgLogo.h
+++ b/ReviewSystem/ReviewSystem/DlgLogo.h
@@ -12,6 +12,7 @@
 	/*< LYW 20211112 - #3708 ADD Start >*/
 	virtual void   IDL2P_OpenHWSettingTool() = 0;
 	/*< LYW 20211112 - #3708 ADD End >*/
+	virtual void IDL2P_OpenMotorOffSetTool() = 0;		//< KEJ 20230621 - #4528 ADD >
 	//is manual Mode?
 	virtual BOOL	IDL2P_IsManualProcessMode() = 0;
 };
@@ -74,4 +75,5 @@
 	afx_msg void OnClickedButton6();
 	CButton m_ctrlHistory;
 	afx_msg void OnBnClickedButtonHwSettingMode();
+	afx_msg void OnBnClickedButtonMotorOffsetTool();		//< KEJ 20230621 - #4528 ADD >
 };
diff --git a/ReviewSystem/ReviewSystem/DlgMotorOffSetTool.cpp b/ReviewSystem/ReviewSystem/DlgMotorOffSetTool.cpp
new file mode 100644
index 0000000..d0c343d
--- /dev/null
+++ b/ReviewSystem/ReviewSystem/DlgMotorOffSetTool.cpp
@@ -0,0 +1,736 @@
+癤�// DlgMotorOffSetTool.cpp: 援ы쁽 �뙆�씪
+//
+
+#include "stdafx.h"
+#include "ReviewSystem.h"
+#include "DlgMotorOffSetTool.h"
+#include <algorithm>
+#include "afxdialogex.h"
+#include "CHCommonClasses/MacroFile.h"
+
+BOOL CMotorOffsetData::CalcOffset(_Inout_ double& GlassPosX, _Inout_ double& GlassPosY)
+{
+	auto Xitem = upper_bound(m_vtXRange.begin(), m_vtXRange.end(), GlassPosX);
+	auto Yitem = upper_bound(m_vtYRange.begin(), m_vtYRange.end(), GlassPosY);
+
+	double dXpos, dYpos, dRangeX, dRangeY;
+	int nXIndex = 0;
+	int nYIndex = 0;
+	// X �삁�쇅泥섎━
+	if (Xitem == m_vtXRange.begin()) {
+		dRangeX = 0;
+		nXIndex = 0;
+	}
+	else if (Xitem == m_vtXRange.end())
+	{
+		Xitem = m_vtXRange.end() - 1;
+		dRangeX = *(Xitem - 1);
+		nXIndex = GetRangeCountX() - 1;
+	}
+	else
+	{
+		dRangeX = *(Xitem - 1);
+		nXIndex = (Xitem)-m_vtXRange.begin();
+	}
+	// Y �삁�쇅泥섎━ 異붽�
+	if (Yitem == m_vtYRange.begin()) {
+		dRangeY = 0;
+		nYIndex = 0;
+	}
+	else if (Yitem == m_vtYRange.end())
+	{
+		Yitem = m_vtYRange.end() - 1;
+		dRangeY = *(Yitem - 1);
+		nYIndex = GetRangeCountY() - 1;
+	}
+	else
+	{
+		dRangeY = *(Yitem - 1);
+		nYIndex = (Yitem)-m_vtYRange.begin();
+	}
+	MotorOffSetInfo pOffsetInfo = m_mapOffsetInfo[nXIndex][nYIndex];
+
+	dXpos = floor((pOffsetInfo.dXoffSetValue * 1000)) / 1000.0;
+	dYpos = floor((pOffsetInfo.dYoffSetValue * 1000)) / 1000.0;
+	GlassPosX = GlassPosX + dXpos;
+	GlassPosY = GlassPosY + dYpos;
+
+//	g_pLog->DisplayMessage(_T("Motor �삤�봽�뀑�쑝濡� �쟻�슜, �뻾蹂� �삤�봽�뀑: X = %.3lf, Y = %.3lf Rate : X = %.3lf, Y = %.3lf "), dXpos, dYpos, pOffsetInfo.dXRate, pOffsetInfo.dYRate);
+	return TRUE;
+}
+
+//setter
+void CMotorOffsetData::SetRangeCountX(_In_ unsigned int nCount) {
+	m_vtXRange.resize(nCount);
+	m_vtXRange;
+}
+void CMotorOffsetData::SetRangeCountY(_In_ unsigned int nCount) { m_vtYRange.resize(nCount); }
+BOOL CMotorOffsetData::SetRangeX(_In_ unsigned int nIdx, _In_ double fX) //exception need
+{
+	if (m_vtXRange.size() <= nIdx) return FALSE;
+	m_vtXRange[nIdx] = fX;
+	return TRUE;
+}
+BOOL CMotorOffsetData::SetRangeY(_In_ unsigned int nIdx, _In_ double fY)
+{
+	if (m_vtYRange.size() < nIdx) return FALSE;
+	m_vtYRange[nIdx] = fY;
+	return TRUE;
+}
+
+BOOL CMotorOffsetData::SetOffsetValue(_In_ unsigned int nXIndex, _In_ unsigned int nYIndex, _In_ MotorOffSetInfo pOffsetInfo)
+{
+	m_mapOffsetInfo[(nXIndex)][(nYIndex)] = pOffsetInfo;
+	return TRUE;
+}
+
+//getter
+int CMotorOffsetData::GetRangeCountX() { return m_vtXRange.size(); }
+int CMotorOffsetData::GetRangeCountY() { return m_vtYRange.size(); }
+double CMotorOffsetData::GetRangeX(_In_ unsigned int nIdx)
+{
+	if (nIdx > m_vtXRange.size()) return 0;
+	return m_vtXRange[nIdx];
+} //exception need
+double CMotorOffsetData::GetRangeY(_In_ unsigned int nIdx)
+{
+	if (nIdx > m_vtYRange.size()) return 0;
+	return m_vtYRange[nIdx];
+}
+MotorOffSetInfo CMotorOffsetData::GetOffsetValue(_In_ int nXIndex, _In_ int nYIndex)
+{
+	MotorOffSetInfo pTemp;
+	if (nXIndex > m_vtXRange.size() || nYIndex > m_vtYRange.size()) return pTemp;
+	return m_mapOffsetInfo[nXIndex][nYIndex];
+}
+
+// File Access
+BOOL CMotorOffsetData::WriteConfigFile(int nIdx)
+{
+	BOOL bReturn = FALSE;
+	CMacroFile macroFile;
+	macroFile.Clear();
+	CString strItem = _T("");
+	CString strData;
+	double dData = 0;
+
+	CString strFilePath;
+	strFilePath.Format(_T("%s\\%s_%d.cfg"), _REVIEW_SERVER_CONFIG_PATH_, MOTOR_OFFSET_CONFIGFILE_DEFAULT_NAME, nIdx);
+
+	int		nXRangeIndex = 0;
+	int		nYRangeIndex = 0;
+	if (m_vtXRange.empty() && m_vtYRange.empty()) return FALSE;
+	nXRangeIndex = GetRangeCountX();
+	nYRangeIndex = GetRangeCountY();
+
+	strItem.Format(_T("%d_XRANGE_COUNT"), nIdx);
+	macroFile.SetItem(strItem, nXRangeIndex);
+
+	for (int nIdex = 0; nIdex < nXRangeIndex; nIdex++)
+	{
+		strItem.Format(_T("%d_X_RANGE_%d"), nIdx, nIdex);
+		dData = GetRangeX(nIdex);
+		macroFile.SetItem(strItem, dData);
+	}
+
+	strItem.Format(_T("%d_YRANGE_COUNT"), nIdx);
+	macroFile.SetItem(strItem, nYRangeIndex);
+
+
+	// fot loop
+	for (int nIdex = 0; nIdex < nYRangeIndex; nIdex++)
+	{
+		strItem.Format(_T("%d_Y_RANGE_%d"), nIdx, nIdex);
+		dData = GetRangeY(nIdex);
+		macroFile.SetItem(strItem, dData);
+	}
+
+
+	for (int nXposIndex = 0; nXposIndex < nXRangeIndex; nXposIndex++)
+	{
+		for (int nYposIndex = 0; nYposIndex < nYRangeIndex; nYposIndex++)
+		{
+			MotorOffSetInfo  pOffsetInfo;
+			pOffsetInfo = GetOffsetValue(nXposIndex, nYposIndex);
+			strItem.Format(_T("[%d][%d][%d]_X"),nIdx, nXposIndex, nYposIndex);
+			dData = pOffsetInfo.dXoffSetValue;
+			macroFile.SetItem(strItem, dData);
+
+			strItem.Format(_T("[%d][%d][%d]_Y"),nIdx, nXposIndex, nYposIndex);
+			dData = pOffsetInfo.dYoffSetValue;
+			macroFile.SetItem(strItem, dData);
+
+		}
+	}
+	bReturn = macroFile.Write(strFilePath);
+
+	return bReturn;
+}
+
+BOOL CMotorOffsetData::ReadConfigFile(int nIdx)
+{
+	CString strPath = _T("");
+	strPath.Format(_T("%s\\%s_%d.cfg"), _REVIEW_SERVER_CONFIG_PATH_, MOTOR_OFFSET_CONFIGFILE_DEFAULT_NAME, nIdx);
+	if (LoadInfo(strPath, nIdx) == FALSE)
+	{
+
+		return FALSE;
+	}
+	return TRUE;
+}
+BOOL CMotorOffsetData::LoadInfo(CString strFilePath, int nIdx)
+{
+	CMacroFile macroFile;
+	if (!macroFile.Read(strFilePath)) 	return FALSE;
+
+	CString strItem = _T("");
+	int		nXRangeIndex = 0;
+	int		nYRangeIndex = 0;
+	double	nXRange = 0;
+	double	nYRange = 0;
+	MotorOffSetInfo pOffsetInfo;
+	memset(&pOffsetInfo, 0, sizeof(MotorOffSetInfo));
+	double dXoffSetValue = 0;
+	double dYoffSetValue = 0;
+	double dXRate = 0;
+	double dYRate = 0;
+	CString strTmp;
+	strTmp.Format(_T("%d_XRANGE_COUNT"), nIdx);
+	macroFile.GetItem(strTmp, nXRangeIndex, 0);
+	strTmp.Format(_T("%d_YRANGE_COUNT"), nIdx);
+	macroFile.GetItem(strTmp, nYRangeIndex, 0);
+	SetRangeCountX(nXRangeIndex);
+	SetRangeCountY(nYRangeIndex);
+
+	for (int nIdex = 0; nIdex < nXRangeIndex; nIdex++)
+	{
+		strItem.Format(_T("%d_X_RANGE_%d"),nIdx, nIdex);
+		macroFile.GetItem(strItem, nXRange);
+		SetRangeX(nIdex, nXRange);
+	}
+	for (int nIdex = 0; nIdex < nYRangeIndex; nIdex++)
+	{
+		strItem.Format(_T("%d_Y_RANGE_%d"),nIdx, nIdex);
+		macroFile.GetItem(strItem, nYRange);
+		SetRangeY(nIdex, nYRange);
+	}
+
+	for (int nXposIndex = 0; nXposIndex < nXRangeIndex; nXposIndex++)
+	{
+		for (int nYposIndex = 0; nYposIndex < nYRangeIndex; nYposIndex++)
+		{
+
+			strItem.Format(_T("[%d][%d][%d]_X"),nIdx, nXposIndex, nYposIndex);
+			macroFile.GetItem(strItem, dXoffSetValue);
+			pOffsetInfo.dXoffSetValue = dXoffSetValue;
+
+			strItem.Format(_T("[%d][%d][%d]_Y"),nIdx, nXposIndex, nYposIndex);
+			macroFile.GetItem(strItem, dYoffSetValue);
+			pOffsetInfo.dYoffSetValue = dYoffSetValue;
+
+			SetOffsetValue(nXposIndex, nYposIndex, pOffsetInfo);
+		}
+	}
+	return TRUE;
+};
+
+// CDlgMotorOffSetTool ���솕 �긽�옄
+
+IMPLEMENT_DYNAMIC(CDlgMotorOffSetTool, CDialogEx)
+
+CDlgMotorOffSetTool::CDlgMotorOffSetTool(CWnd* pParent /*=nullptr*/)
+	: CDialogEx(IDD_DLG_MOTOR_OFFSET_TOOL, pParent)
+	, m_nEditXposCount(0)
+	, m_nEditYposCount(0)
+	, m_nCurOffsetModuleIdx(0)
+{
+	InitializeCriticalSection(&m_csMapSafer);
+}
+
+CDlgMotorOffSetTool::~CDlgMotorOffSetTool()
+{
+	DeleteCriticalSection(&m_csMapSafer);
+}
+
+void CDlgMotorOffSetTool::DoDataExchange(CDataExchange* pDX)
+{
+	DDX_Control(pDX, IDC_GRID_MOTOR_OFFSET_INFO, m_ctrlGridMotorOffSetInfo);
+	DDX_Text(pDX, IDC_EDIT_MOTOR_OFFSET_COUNTX, m_nEditXposCount);
+	DDX_Text(pDX, IDC_EDIT_MOTOR_OFFSET_COUNTY, m_nEditYposCount);
+	DDX_Control(pDX, IDC_COMBO_MOTOR_OFFSET_MODULEIDX, m_ctrlCmbModuleIdx);
+	CDialogEx::DoDataExchange(pDX);
+}
+
+
+
+BEGIN_MESSAGE_MAP(CDlgMotorOffSetTool, CDialogEx)
+	ON_BN_CLICKED(IDCANCEL, &CDlgMotorOffSetTool::OnBnClickedCancel)
+	ON_BN_CLICKED(IDOK, &CDlgMotorOffSetTool::OnBnClickedOK)
+	ON_EN_KILLFOCUS(IDC_EDIT_MOTOR_OFFSET_COUNTX, &CDlgMotorOffSetTool::OnXCountKillFocus)
+	ON_EN_KILLFOCUS(IDC_EDIT_MOTOR_OFFSET_COUNTY, &CDlgMotorOffSetTool::OnYCountKillFocus)
+	ON_CBN_SELCHANGE(IDC_COMBO_MOTOR_OFFSET_MODULEIDX, &CDlgMotorOffSetTool::OnSelchangeComboMotorOffsetModuleidx)
+END_MESSAGE_MAP()
+
+
+BOOL CDlgMotorOffSetTool::OnInitDialog()
+{
+	CDialogEx::OnInitDialog();
+	InitProcess();
+	return 0;
+}
+
+void CDlgMotorOffSetTool::OnBnClickedOK()
+{
+	CDialogEx::OnOK();
+	UpdateData(TRUE);
+
+	ApplyOffSetInfo();
+	UpdateGridcontrol();
+	int nIdx = 0;
+	for (auto it =m_mapMotorOffsetInfo.begin(); it != m_mapMotorOffsetInfo.end(); it++)
+	{
+		it->second.WriteConfigFile(nIdx++);
+	}
+
+	// Critical Section Start
+	EnterCriticalSection(&m_csMapSafer);
+	m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo;
+	LeaveCriticalSection(&m_csMapSafer);
+}
+
+void CDlgMotorOffSetTool::OnBnClickedCancel()
+{
+	// TODO: �뿬湲곗뿉 而⑦듃濡� �븣由� 泥섎━湲� 肄붾뱶瑜� 異붽��빀�땲�떎.
+	CDialogEx::OnCancel();
+	UpdateData(TRUE);
+
+	ApplyOffSetInfo();
+	UpdateGridcontrol();
+
+	CString strMessage;
+
+	//	CheckDiff();
+
+	if (m_mapMotorOffsetInfo_OLD == m_mapMotorOffsetInfo)
+	{
+		return;
+	}
+	else if (IDYES == AfxMessageBox(_T("蹂�寃쎌젏�씠 諛쒓껄�릺�뿀�뒿�땲�떎 .���옣 �븯�떆寃좎뒿�땲源�?"), MB_YESNO | MB_ICONQUESTION))
+	{
+		int nIdx = 0;
+		for (auto it = m_mapMotorOffsetInfo.begin(); it != m_mapMotorOffsetInfo.end(); it++)
+		{
+			it->second.WriteConfigFile(nIdx++);
+		}
+		// Critical Section Start
+		EnterCriticalSection(&m_csMapSafer);
+		m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo;
+		LeaveCriticalSection(&m_csMapSafer);
+		// Critical Section End
+	}
+	else
+	{
+		EnterCriticalSection(&m_csMapSafer);
+		m_mapMotorOffsetInfo = m_mapMotorOffsetInfo_OLD;
+		LeaveCriticalSection(&m_csMapSafer);
+	}
+}
+
+void CDlgMotorOffSetTool::OnXCountKillFocus()
+{
+	UpdateData(TRUE);
+
+	auto pMotorOffsetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx];
+
+
+	if (m_nEditYposCount <= 0) m_nEditYposCount = 1;
+	if (m_nEditXposCount <= 0) m_nEditXposCount = 1;
+	if (m_nEditYposCount > 100) m_nEditYposCount = 100;
+	if (m_nEditXposCount > 100) m_nEditXposCount = 100;
+	pMotorOffsetData->SetRangeCountX(m_nEditXposCount);
+	pMotorOffsetData->SetRangeCountY(m_nEditYposCount);
+
+	m_ctrlGridMotorOffSetInfo.DeleteAllItems();
+
+	UpdateData(FALSE);
+	InitOffSetInfoGridControl();
+	UpdateGridcontrol();
+	Invalidate(TRUE);
+}
+
+void CDlgMotorOffSetTool::OnYCountKillFocus()
+{
+	UpdateData(TRUE);
+
+	auto pMotorOffsetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx];
+
+
+	if (m_nEditYposCount <= 0) m_nEditYposCount = 1;
+	if (m_nEditXposCount <= 0) m_nEditXposCount = 1;
+	if (m_nEditYposCount > 100) m_nEditYposCount = 100;
+	if (m_nEditXposCount > 100) m_nEditXposCount = 100;
+	pMotorOffsetData->SetRangeCountX(m_nEditXposCount);
+	pMotorOffsetData->SetRangeCountY(m_nEditYposCount);
+
+	m_ctrlGridMotorOffSetInfo.DeleteAllItems();
+
+	UpdateData(FALSE);
+	InitOffSetInfoGridControl();
+	UpdateGridcontrol();
+	Invalidate(TRUE);
+}
+
+void CDlgMotorOffSetTool::InitOffSetInfoGridControl()
+{
+	int nRowIdx, nColIdx, nRows, nCols, nFixRows, nDataColumnWidth, nMargin;
+	CString strTemp;
+	CRect rect;
+	nRows = 0;
+	nCols = 0;
+	nFixRows = 0;
+	nRowIdx = 0;
+	nColIdx = 0;
+	double dGlassXsize = 1500;
+	auto pCurrentOffsetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx];
+
+	bool bDefault = FALSE;
+	{
+		nRows = (pCurrentOffsetData->GetRangeCountY()) + GRID_ROW_START_POINT;
+
+	}
+
+	{
+		nCols = (pCurrentOffsetData->GetRangeCountX() * 2) + GRID_COL_START_POINT;
+	}
+
+	m_ctrlGridMotorOffSetInfo.GetWindowRect(&rect);
+	m_ctrlGridMotorOffSetInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(0xFF, 0xFF, 0xE0));
+	m_ctrlGridMotorOffSetInfo.SetRowCount(nRows);
+	m_ctrlGridMotorOffSetInfo.SetColumnCount(nCols);
+	for (int nIndex = 0; nIndex < nRows; nIndex++) {
+		m_ctrlGridMotorOffSetInfo.SetItemBkColour(nIndex, 0, Color[((nIndex / 2) - 1) % 10]);
+		m_ctrlGridMotorOffSetInfo.SetItemBkColour(nIndex, 1, Color[((nIndex / 2) - 1) % 10]);
+
+	}
+	for (int nIndex = 0; nIndex < nCols; nIndex++) {
+		m_ctrlGridMotorOffSetInfo.SetItemBkColour(0, nIndex, Color[((nIndex / 2) - 1) % 10]);
+	}
+
+	nMargin = 5;
+	nDataColumnWidth = 40;
+
+	GV_ITEM Item;
+
+	//泥ル쾲吏�
+	Item.mask = GVIF_TEXT;
+	Item.row = 0;
+	Item.col = 0;
+	//init
+	for (int nRowIdex = 0; nRowIdex < nRows; nRowIdex++)
+	{
+		for (int nColIdex = 0; nColIdex < nCols; nColIdex++)
+		{
+			Item.row = nRowIdex;
+			Item.col = nColIdex;
+			strTemp.Format(_T(""));
+			Item.strText = strTemp;
+			m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+		}
+	}
+	nRowIdx = 0;
+	nColIdx = 0;
+	Item.row = nRowIdx;
+	Item.col = nColIdx;
+	strTemp.Format(_T("0 , 0"));
+	Item.strText = strTemp;
+	m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+	m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR);
+	m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35);
+	m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY);
+
+	nRowIdx++;
+	Item.row = nRowIdx;
+	Item.col = nColIdx;
+	strTemp.Format(_T("[YRange�넃]"));
+	Item.strText = strTemp;
+	m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+	m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR);
+	m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35);
+	m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY);
+
+	nRowIdx = 0;
+	nColIdx = 1;
+	Item.row = nRowIdx;
+	Item.col = nColIdx;
+	strTemp.Format(_T("[XRange�넂]")); //Max�� �뿴留욎땄
+	Item.strText = strTemp;
+	m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+	m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR);
+	m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35);
+	m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY);
+
+	nRowIdx++;
+	Item.row = nRowIdx;
+	Item.col = nColIdx;
+	strTemp.Format(_T("*"));
+	Item.strText = strTemp;
+	m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+	m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR);
+	m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35);
+	m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY);
+	for (int nRowIndex = GRID_ROW_START_POINT; nRowIndex < nRows; nRowIndex++)
+	{
+
+		nRowIdx = nRowIndex;
+		nColIdx = 1;
+
+		Item.row = nRowIdx;
+		Item.col = nColIdx;
+		strTemp.Format(_T("Offset"));
+		Item.strText = strTemp;
+		m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+		m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR);
+		m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35);
+		m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY);
+
+
+	}
+	for (int nColIndex = GRID_COL_START_POINT; nColIndex < nCols; nColIndex++)
+	{
+
+		nRowIdx = 1;
+		nColIdx = nColIndex;
+
+		if (nColIndex % 2 == 0)
+		{
+			Item.row = nRowIdx;
+			Item.col = nColIdx;
+			strTemp.Format(_T("[%d][x]"), nColIdx / 2);
+			Item.strText = strTemp;
+			m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+
+			m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR);
+			m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 15);
+			m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY);
+		}
+		else
+		{
+			Item.row = nRowIdx;
+			Item.col = nColIdx;
+			strTemp.Format(_T("[%d][y]"), nColIdx / 2);
+			Item.strText = strTemp;
+			m_ctrlGridMotorOffSetInfo.SetItem(&Item);
+			m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR);
+			m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 15);
+			m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY);
+		}
+	}
+}
+
+void CDlgMotorOffSetTool::SetColorType()
+{
+	for (int i = 0; i < sizeof(Color); i++)
+	{
+		if (i == 0) {
+			Color[0] = FFA7A7;
+		}
+		else if (i == 1) {
+			Color[1] = FFC19E;
+		}
+		else if (i == 2) {
+			Color[2] = FFE08C;
+		}
+		else if (i == 3) {
+			Color[3] = FAED7D;
+		}
+		else if (i == 4) {
+			Color[4] = FFB2F5;
+		}
+		else if (i == 5) {
+			Color[5] = A566FF;
+		}
+		else if (i == 6) {
+			Color[6] = D9418C;
+		}
+		else if (i == 7) {
+			Color[7] = A00D8FF;
+		}
+		else if (i == 8) {
+			Color[8] = A2F9D27;
+		}
+		else if (i == 9) {
+			Color[9] = A4641D9;
+		}
+	}
+}
+
+void CDlgMotorOffSetTool::InitProcess()
+{
+	SetColorType();
+
+	CString strTmp;
+	for (int i =0; i<2; i++)
+	{
+		strTmp.Format(_T("%d"), i);
+		m_ctrlCmbModuleIdx.AddString(strTmp);
+	}
+	m_ctrlCmbModuleIdx.SetCurSel(m_nCurOffsetModuleIdx);
+
+	BOOL bRet = FALSE;
+	//怨듦컙 留뚮뱾湲� 
+	for (int i = 0; i < 2; i++)
+	{
+		CMotorOffsetData pMotorOffsetData;
+		bRet = pMotorOffsetData.ReadConfigFile(i);
+		if (bRet == FALSE)
+			break;
+
+		m_mapMotorOffsetInfo.insert(std::make_pair(i, pMotorOffsetData));
+
+	}
+	if (bRet == FALSE)
+		return;
+
+	InitOffSetInfoGridControl();
+	UpdateGridcontrol(); // map -> Grid
+
+	// CriticalSection Start
+	EnterCriticalSection(&m_csMapSafer);
+	m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo;
+	LeaveCriticalSection(&m_csMapSafer);
+}
+
+void CDlgMotorOffSetTool::UpdateGridcontrol()
+{
+	//int nModuleidx = 0;
+	int nRow = GRID_ROW_START_POINT;
+	int nCol = GRID_COL_START_POINT;
+	CString strData;
+
+	m_nEditXposCount = m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountX();
+	m_nEditYposCount = m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountY();
+	CString strTemp = _T("");
+	strTemp.Format(_T("%d"), m_nEditXposCount);
+	SetDlgItemText(IDC_EDIT_MOTOR_OFFSET_COUNTX, strTemp);
+	strTemp.Format(_T("%d"), m_nEditYposCount);
+	SetDlgItemText(IDC_EDIT_MOTOR_OFFSET_COUNTY, strTemp);
+
+	for (int nXIndex = 0; nXIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountX(); nXIndex++)
+	{
+		strData.Format(_T("%.03lf"), m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeX(nXIndex));
+		m_ctrlGridMotorOffSetInfo.SetItemText(0, nCol, strData); //X Range
+		m_ctrlGridMotorOffSetInfo.MergeCells(0, nCol, 0, nCol + 1);
+		nCol += 2;
+
+	}
+	for (int nYIndex = 0; nYIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountY(); nYIndex++)
+	{
+
+		strData.Format(_T("%.03lf"), m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeY(nYIndex));
+		m_ctrlGridMotorOffSetInfo.SetItemText(nRow, 0, strData);
+		nRow ++;
+	}
+
+	nCol = GRID_COL_START_POINT;
+	nRow = GRID_ROW_START_POINT;
+	for (int nYposIndex = 0; nYposIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountY(); nYposIndex++)
+	{
+		for (int nXposIndex = 0; nXposIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountX(); nXposIndex++)
+		{
+			MotorOffSetInfo pOffset = m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetOffsetValue(nXposIndex, nYposIndex);
+
+			strData.Format(_T("%.03lf"), pOffset.dXoffSetValue);
+			m_ctrlGridMotorOffSetInfo.SetItemText(nRow, nCol, strData);//X offset
+			m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRow, nCol, RGB(0xF0, 0xF0, 0xD0));
+
+			nCol++;
+
+
+			strData.Format(_T("%.03lf"), pOffset.dYoffSetValue);
+			m_ctrlGridMotorOffSetInfo.SetItemText(nRow, nCol, strData); //Y Offset
+			m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRow, nCol, RGB(0xF0, 0xF0, 0xD0));
+
+			nCol++;
+		}
+		nRow += 1;
+		nCol = GRID_COL_START_POINT;
+	}
+}
+
+BOOL CDlgMotorOffSetTool::CalOffsetInfo(int nModuleIdx, double & XPos, double & YPos)
+{
+	BOOL nRet = m_mapMotorOffsetInfo_OLD[nModuleIdx].CalcOffset(XPos, YPos);
+	return nRet;
+}
+
+void CDlgMotorOffSetTool::ApplyOffSetInfo()
+{
+	//int nModuleidx = 0;
+	double dXoffset = 0;
+	double dYoffset = 0;
+	double dXRate = 0;
+	double dYRate = 0;
+	int nRow = GRID_ROW_START_POINT;
+	int nCol = GRID_COL_START_POINT;
+	CString strData;
+	CString strAOIName;
+	double dXRange = 0;
+	double dYRange = 0;
+	double nGlassSize = 2500;
+
+	auto pMotorOffSetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx];
+
+	MotorOffSetInfo pOffsetInfo;
+	nCol = GRID_COL_START_POINT;
+	for (int nXposIndex = 0; nXposIndex < pMotorOffSetData->GetRangeCountX(); nXposIndex++)
+	{
+		strData = m_ctrlGridMotorOffSetInfo.GetItemText(0, nCol); //X Range
+		dXRange = atof((CStringA)strData);
+		pMotorOffSetData->SetRangeX(nXposIndex, dXRange);
+		// strData = m_ctrlGridReviewOffSetInfo.GetItemText(nRow, 1); //Y Max
+		nCol += 2;
+	}
+	nRow = GRID_ROW_START_POINT;
+	for (int nYposIndex = 0; nYposIndex < pMotorOffSetData->GetRangeCountY(); nYposIndex++)
+	{
+		strData = m_ctrlGridMotorOffSetInfo.GetItemText(nRow, 0); //YRange
+		dYRange = atof((CStringA)strData);
+		pMotorOffSetData->SetRangeY(nYposIndex, dYRange);
+		nRow ++;
+	}
+	nCol = GRID_COL_START_POINT;
+	nRow = GRID_ROW_START_POINT;
+
+	for (int nYposIndex = 0; nYposIndex < pMotorOffSetData->GetRangeCountY(); nYposIndex++)
+	{
+
+		for (int nXposIndex = 0; nXposIndex < pMotorOffSetData->GetRangeCountX(); nXposIndex++)
+		{
+
+			strData = m_ctrlGridMotorOffSetInfo.GetItemText(nRow, nCol); //X offset
+			pOffsetInfo.dXoffSetValue = atof((CStringA)strData);
+			nCol++;
+			strData = m_ctrlGridMotorOffSetInfo.GetItemText(nRow, nCol); //Y Offset
+			pOffsetInfo.dYoffSetValue = atof((CStringA)strData);
+
+			pMotorOffSetData->SetOffsetValue(nXposIndex, nYposIndex, pOffsetInfo);
+			nCol++;
+		}
+		nRow ++;
+		nCol = GRID_COL_START_POINT;
+	}
+};
+
+void CDlgMotorOffSetTool::OnSelchangeComboMotorOffsetModuleidx()
+{
+	ApplyOffSetInfo();
+	m_nCurOffsetModuleIdx = m_ctrlCmbModuleIdx.GetCurSel();
+
+	InitOffSetInfoGridControl();
+	UpdateGridcontrol(); // map -> Grid
+
+	// CriticalSection Start
+	EnterCriticalSection(&m_csMapSafer);
+	m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo;
+	LeaveCriticalSection(&m_csMapSafer);
+}
diff --git a/ReviewSystem/ReviewSystem/DlgMotorOffSetTool.h b/ReviewSystem/ReviewSystem/DlgMotorOffSetTool.h
new file mode 100644
index 0000000..1fa3c1e
--- /dev/null
+++ b/ReviewSystem/ReviewSystem/DlgMotorOffSetTool.h
@@ -0,0 +1,151 @@
+癤�#pragma once
+#include <vector>
+#include <map>
+
+#define OFFSET_LIST_GRID_ROW_COUNT  1
+#define OFFSET_LIST_GRID_COL_COUNT  3 
+
+#define  FIXCELLCOLOR RGB(255, 102, 178)
+#define  NOFIXCELLCOLOR RGB(240, 240, 240)
+#define  MINCELLCOLOR RGB(204, 204, 255)
+#define  MAXCELLCOLOR RGB(204, 255, 204)
+#define	MOTOR_OFFSET_CONFIGFILE_DEFAULT_NAME _T("MotorOffset")
+#define	MOTOR_OFFSET_BACKUP_FORDER_NAME _T("OffsetBackup")
+#define	MOTOR_OFFSET_BACKUP_FORDER_PATH _T("D:\\DIT_Review\\ReviewServerConfig\\ReviewOffset\\OffsetBackup\\")
+#define GRID_ROW_START_POINT 2
+#define GRID_COL_START_POINT 2
+
+interface IDialogMotorOffSet2Parent 
+{
+	virtual BOOL IDMO2P_GetMotorPos(int nModule, double &dXpos, double &dYpos) = 0;
+};
+struct MotorOffSetInfo
+{	
+	double dXoffSetValue;
+	double dYoffSetValue;
+	MotorOffSetInfo() {
+		dXoffSetValue = 0;
+		dYoffSetValue = 0;
+	}
+	bool operator==(const MotorOffSetInfo& input) const
+	{
+		return 0 == memcmp(&input, this, sizeof(MotorOffSetInfo));
+	}
+};
+typedef std::vector<MotorOffSetInfo> VecMotorOffSetData;
+
+class CMotorOffsetData
+{
+public:
+	CMotorOffsetData() { ; }
+
+	~CMotorOffsetData() { ; }
+
+	// Defect Review
+	BOOL			CalcOffset(_Inout_ double& GlassPosX, _Inout_ double& GlassPos);
+
+	// Setting Dlg
+	void			SetRangeCountX(_In_ unsigned int nCount);
+	void			SetRangeCountY(_In_ unsigned int nCount);
+	BOOL			SetRangeX(_In_ unsigned int nIdx, _In_ double fX);
+	BOOL			SetRangeY(_In_ unsigned int nIdx, _In_ double fY);
+
+	int				GetRangeCountX();
+	int				GetRangeCountY();
+	double			GetRangeX(_In_ unsigned int nIdx);
+	double			GetRangeY(_In_ unsigned int nIdx);
+
+	BOOL			SetOffsetValue(_In_ unsigned int nXIndex, _In_ unsigned int nYIndex, _In_ MotorOffSetInfo pOffsetInfo);
+
+	MotorOffSetInfo		GetOffsetValue(_In_ int nXIndex, _In_ int nYIndex);
+
+	// File Access
+	BOOL			WriteConfigFile(int nIdx);
+	BOOL			ReadConfigFile(int nIdx);
+
+	//Read Func
+	BOOL LoadInfo(CString strFilePath, int nIdx);
+
+	bool operator==(const CMotorOffsetData& input) const
+	{
+		if (this->m_vtXRange == input.m_vtXRange)
+		{
+			if (this->m_vtYRange == input.m_vtYRange)
+			{
+				if (this->m_mapOffsetInfo == input.m_mapOffsetInfo)
+				{
+
+					return TRUE;
+				}
+			}
+		}
+		else FALSE;
+	}
+
+protected:
+
+	std::vector<double>		m_vtXRange;
+	std::vector<double>		m_vtYRange;
+	std::map<int, std::map<int, MotorOffSetInfo>>	m_mapOffsetInfo;  // <YRange , <XRange , OffsetInfo> >
+private:
+
+
+};
+typedef std::map<int, CMotorOffsetData>					MapMotorOffSetInfo;
+
+
+class CDlgMotorOffSetTool : public CDialogEx
+{
+	DECLARE_DYNAMIC(CDlgMotorOffSetTool)
+
+public:
+	CDlgMotorOffSetTool(CWnd* pParent = nullptr);   // �몴以� �깮�꽦�옄�엯�땲�떎.
+	virtual ~CDlgMotorOffSetTool();
+
+	// ���솕 �긽�옄 �뜲�씠�꽣�엯�땲�떎.
+#ifdef AFX_DESIGN_TIME
+	enum { IDD = IDD_DLG_MOTOR_OFFSET_TOOL };
+#endif
+
+
+protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 吏��썝�엯�땲�떎.
+
+	DECLARE_MESSAGE_MAP()
+
+public:
+	virtual BOOL OnInitDialog();
+	afx_msg void OnBnClickedOK();
+	afx_msg void OnBnClickedCancel();
+	afx_msg void OnXCountKillFocus();
+	afx_msg void OnYCountKillFocus();
+
+	void InitOffSetInfoGridControl();
+	void SetColorType();
+	void InitProcess();
+	void UpdateGridcontrol();
+	void SetDMO2P(IDialogMotorOffSet2Parent* pDMO2P) { m_pDMO2P = pDMO2P; }
+
+	BOOL CalOffsetInfo(int nModuleIdx, double &XPos, double &YPos);
+	////////////==============================
+	void ApplyOffSetInfo(); //Grid -> Map
+	//////////================================
+
+protected:
+	CRITICAL_SECTION			m_csMapSafer;
+
+	COLORTYPE Color[10];
+
+	int m_nEditXposCount;
+	int m_nEditYposCount;
+	// �꽕鍮꾨퀎 Offset 
+	int m_nCurOffsetModuleIdx;
+public:
+	CGridCtrl m_ctrlGridMotorOffSetInfo;
+	IDialogMotorOffSet2Parent* m_pDMO2P;
+
+	MapMotorOffSetInfo			m_mapMotorOffsetInfo;
+	MapMotorOffSetInfo			m_mapMotorOffsetInfo_OLD;
+	CComboBox m_ctrlCmbModuleIdx;
+	afx_msg void OnSelchangeComboMotorOffsetModuleidx();
+};
diff --git a/ReviewSystem/ReviewSystem/DlgReviewOffSetTool.h b/ReviewSystem/ReviewSystem/DlgReviewOffSetTool.h
index cd85741..629ec03 100644
--- a/ReviewSystem/ReviewSystem/DlgReviewOffSetTool.h
+++ b/ReviewSystem/ReviewSystem/DlgReviewOffSetTool.h
@@ -1,23 +1,25 @@
 癤�//#include "ReviewInterface.h"
 
 #pragma once
-enum OFFSETCOUNT {
-	CAM_MAX_COUNT = 20, XPOS_MAX_COUNT = 10, SCAN_MAX_COUNT = 10, PROGRESS_BAR_MAX = 2000
-};
-
-enum COLORTYPE {
-	FFA7A7 = RGB(255, 167, 167),
-	FFC19E = RGB(255, 193, 158),
-	FFE08C = RGB(255, 224, 140),
-	FAED7D = RGB(250, 237, 125),
-	FFB2F5 = RGB(255, 178, 245),
-
-	A566FF = RGB(165, 102, 255),
-	D9418C = RGB(217, 65, 140),
-	A00D8FF = RGB(0, 216, 255),
-	A2F9D27 = RGB(47, 157, 39),
-	A4641D9 = RGB(70, 65, 217)
-};
+/* < KEJ 20230621 - #4528 DEL Start > */
+// enum OFFSETCOUNT {
+// 	CAM_MAX_COUNT = 20, XPOS_MAX_COUNT = 10, YPOS_MAX_COUNT = 10, SCAN_MAX_COUNT = 10, AOI_MAX_COUNT = 10, PROGRESS_BAR_MAX = 2000
+// };
+// 
+// enum COLORTYPE {
+// 	FFA7A7 = RGB(255, 167, 167),
+// 	FFC19E = RGB(255, 193, 158),
+// 	FFE08C = RGB(255, 224, 140),
+// 	FAED7D = RGB(250, 237, 125),
+// 	FFB2F5 = RGB(255, 178, 245),
+// 
+// 	A566FF = RGB(165, 102, 255),
+// 	D9418C = RGB(217, 65, 140),
+// 	A00D8FF = RGB(0, 216, 255),
+// 	A2F9D27 = RGB(47, 157, 39),
+// 	A4641D9 = RGB(70, 65, 217)
+// };
+/* < KEJ 20230621 - #4528 DEL End > */
 //enum MotorOringTYPE {
 //	LEFT_Top = 0, RIGHT_TOP,LEFT_BOTTOM, RIGHT_BOTTOM
 //};
diff --git a/ReviewSystem/ReviewSystem/ReviewInterface.cpp b/ReviewSystem/ReviewSystem/ReviewInterface.cpp
index 944250b..396ee3f 100644
--- a/ReviewSystem/ReviewSystem/ReviewInterface.cpp
+++ b/ReviewSystem/ReviewSystem/ReviewInterface.cpp
@@ -3760,6 +3760,23 @@
 	pReviewOffSetTool->GetOffSetInfo(nModule, nCam, nScan, dGlassXPos,dXpos, dYpos);
 	return TRUE;
 }
+/* < KEJ 20230621 - #4528 ADD Start > */
+BOOL CReviewInterface::IDMO2P_GetMotorPos(int nModule, double &dXpos, double &dYpos)
+{
+	dXpos = m_vecModuleStatus[nModule].GetMotorPosition()->dMotorPosX;
+	dYpos = m_vecModuleStatus[nModule].GetMotorPosition()->dMotorPosY;
+	return TRUE;
+
+}
+
+BOOL CReviewInterface::CalcMotorOffSetValue(int nModule, double &dXpos, double &dYpos)
+{
+	CDlgMotorOffSetTool* pMotorOffSetTool = m_pView->GetMotorOffSetToolHandle();
+
+	pMotorOffSetTool->CalOffsetInfo(nModule, dXpos, dYpos);
+	return TRUE;
+}
+/* < KEJ 20230621 - #4528 ADD End > */
 
 BOOL CReviewInterface::IDRO2P_SetGlassMode(BOOL bMode, int nCamidx, int nScanidx, double nXpos, double nYpos)
 {
@@ -9060,7 +9077,12 @@
 {
 	m_pView->ShowHWSettingMode();
 }
-
+/* < KEJ 20230621 - #4528 ADD Start > */
+void CReviewInterface::IDL2P_OpenMotorOffSetTool()
+{
+	m_pView->ShowMotorOffSetTool();
+}
+/* < KEJ 20230621 - #4528 ADD  End > */
 BOOL CReviewInterface::IDL2P_IsManualProcessMode()
 {
 	return IsManualProcessMode();
diff --git a/ReviewSystem/ReviewSystem/ReviewInterface.h b/ReviewSystem/ReviewSystem/ReviewInterface.h
index 94ed860..f79ac20 100644
--- a/ReviewSystem/ReviewSystem/ReviewInterface.h
+++ b/ReviewSystem/ReviewSystem/ReviewInterface.h
@@ -47,6 +47,7 @@
 #include "DlgReviewPopUp.h"
 #include "DlgReviewHistoryTool.h"
 #include "DlgHardwareSettingMode.h"
+#include "DlgMotorOffSetTool.h"		//< KEJ 20230621 - #4528 ADD >
 
 #include "CHTotalPitchMeasure/TotalPitchMeasure.h"
 #include "CHResultFileManager/StringRaw.h"
@@ -111,7 +112,8 @@
 	                        public IDiagnosisProcessor2Parent,
 							public IDialogReviewOffSet2Parent,
 							public IDialogReviewHistory2Parent,
-							public IDialogHardwareSettingMode2Parent
+							public IDialogHardwareSettingMode2Parent,
+							public IDialogMotorOffSet2Parent
 {
 public:
 	CReviewInterface(void);
@@ -299,7 +301,10 @@
 	virtual BOOL IDRO2P_GetMotorPos(int nModule,double &dXpos, double &dYpos);
 	// GetOffSetValue
 	virtual BOOL GetOffSetValue(int nModule, int nCam, int nScan, double dGlassXPos, double &dXpos, double &dYpos);
-
+	/* < KEJ 20230621 - #4528 ADD Start > */
+	virtual BOOL IDMO2P_GetMotorPos(int nModule, double &dXpos, double &dYpos);
+	virtual BOOL CalcMotorOffSetValue(int nModule, double &dXpos, double &dYpos);
+	/* < KEJ 20230621 - #4528 ADD  End > */
 	virtual BOOL IDRO2P_SetGlassMode(BOOL bMode, int nCamidx, int nScanidx, double nXpos, double nYpos);
 	virtual BOOL IDRO2P_SetOffsetPram(int nCamIdx, int nScanIdx, BOOL bUse = 0);
 
@@ -536,6 +541,7 @@
 	virtual void IDL2P_OpenHWSettingTool();
 	virtual BOOL	IDL2P_IsManualProcessMode();
 	/*< LYW 20211112 - #3708 ADD End >*/
+	virtual void IDL2P_OpenMotorOffSetTool();		//< KEJ 20230621 - #4528 ADD >
 
 	// dialog HardwareSettingMode 2 Parent
 	// review camera
diff --git a/ReviewSystem/ReviewSystem/ReviewSystem.rc b/ReviewSystem/ReviewSystem/ReviewSystem.rc
index 26e8d80..26b4fd0 100644
--- a/ReviewSystem/ReviewSystem/ReviewSystem.rc
+++ b/ReviewSystem/ReviewSystem/ReviewSystem.rc
@@ -517,6 +517,7 @@
     PUSHBUTTON      "OFFSET",IDC_BUTTON5,68,7,30,14
     PUSHBUTTON      "History",IDC_BUTTON6,6,7,29,14
     PUSHBUTTON      "H / W",IDC_BUTTON_HW_SETTING_MODE,35,7,33,14
+    PUSHBUTTON      "Motor Offset",IDC_BUTTON_MOTOR_OFFSET_TOOL,6,22,64,14
 END
 
 IDD_DLG_RESULT_GRAPH DIALOGEX 0, 0, 409, 264
@@ -981,6 +982,25 @@
     PUSHBUTTON      "DisConnect",IDC_BUTTON_REVIEW_CAM_DISCONNECT,26,84,63,19
 END
 
+IDD_DLG_MOTOR_OFFSET_TOOL DIALOGEX 0, 0, 707, 420
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    DEFPUSHBUTTON   "확인",IDOK,595,399,50,14
+    PUSHBUTTON      "취소",IDCANCEL,649,399,50,14
+    EDITTEXT        IDC_EDIT_MOTOR_OFFSET_COUNTX,561,21,40,14,ES_AUTOHSCROLL | ES_NUMBER
+    EDITTEXT        IDC_EDIT_MOTOR_OFFSET_COUNTY,645,21,40,14,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "X Count",IDC_STATIC,525,21,26,8
+    LTEXT           "Y Count",IDC_STATIC,609,21,35,8
+    LTEXT           "(0~100)",IDC_STATIC,525,28,28,8
+    LTEXT           "(0~100)",IDC_STATIC,609,28,28,8
+    GROUPBOX        "Param Setting",IDC_STATIC,511,7,182,35
+    CONTROL         "Custom1",IDC_GRID_MOTOR_OFFSET_INFO,"MFCGridCtrl",WS_TABSTOP,7,49,686,343
+    COMBOBOX        IDC_COMBO_MOTOR_OFFSET_MODULEIDX,42,21,48,77,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Module",IDC_STATIC,7,7,91,35
+    LTEXT           "iIndex : ",IDC_STATIC,14,23,28,8
+END
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -1372,6 +1392,14 @@
         TOPMARGIN, 7
         BOTTOMMARGIN, 169
     END
+
+    IDD_DLG_MOTOR_OFFSET_TOOL, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 700
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 413
+    END
 END
 #endif    // APSTUDIO_INVOKED
 
@@ -1486,6 +1514,11 @@
     0
 END
 
+IDD_DLG_MOTOR_OFFSET_TOOL AFX_DIALOG_LAYOUT
+BEGIN
+    0
+END
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
diff --git a/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj b/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj
index ba95229..ca0049c 100644
--- a/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj
+++ b/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj
@@ -123,7 +123,7 @@
       <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>CHVirtualGlassMapd_x64_vc15.lib;chartdir51.lib;CHCameraControlsd_x64_vc15.lib;LineCheckerd_x64_vc15.lib;CHImageControlsd_x64_vc15.lib;CHCommonClassesd_x64_vc15.lib;CHCommonControlsd_x64_vc15.lib;CHResultFileManagerd_x64_vc15.lib;CHReviewReciped_x64_vc15.lib;CHReviewSettingd_x64_vc15.lib;CHReviewResultd_x64_vc15.lib;CHEdgeTriangled_x64_vc15.lib;CHPathSchedulerd_x64_vc15.lib;CHMotorCalibratord_x64_vc15.lib;CHAutoLightControlsd_x64_vc15.lib;CHAlignFinderd_x64_vc15.lib;CHThreadPoolsd_x64_vc15.lib;CHReviewResultParserd_x64_vc15.lib;CHReviewDefectFinderd_x64_vc15.lib;CHReviewPrioritySorterd_x64_vc15.lib;CHDefectPickerd_x64_vc15.lib;IOCPNetworkd_x64_vc15.lib;CHMotorControlsd_x64_vc15.lib;CHLensChangeControlsd_x64_vc15.lib;CHLightControlsd_x64_vc15.lib;CHAfmControlsd_x64_vc15.lib;CHSignalControlsd_x64_vc15.lib;CHVcrControlsd_x64_vc15.lib;CHWsiControlsd_x64_vc15.lib;CHTotalPitchMeasured_x64_vc15.lib;M_AutoDiagnosisManagerd_x64_vc17.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>CHVirtualGlassMapd_x64_vc15.lib;chartdir51.lib;CHCameraControlsd_x64_vc15.lib;LineCheckerd_x64_vc15.lib;CHImageControlsd_x64_vc15.lib;CHCommonClassesd_x64_vc15.lib;CHCommonControlsd_x64_vc15.lib;CHResultFileManagerd_x64_vc15.lib;CHReviewReciped_x64_vc15.lib;CHReviewSettingd_x64_vc15.lib;CHReviewResultd_x64_vc15.lib;CHEdgeTriangled_x64_vc15.lib;CHPathSchedulerd_x64_vc15.lib;CHMotorCalibratord_x64_vc15.lib;CHAutoLightControlsd_x64_vc15.lib;CHAlignFinderd_x64_vc15.lib;CHThreadPoolsd_x64_vc15.lib;CHReviewResultParserd_x64_vc15.lib;CHReviewDefectFinderd_x64_vc15.lib;CHReviewPrioritySorterd_x64_vc15.lib;CHDefectPickerd_x64_vc15.lib;IOCPNetworkd_x64_vc15.lib;CHMotorControlsd_x64_vc15.lib;CHLensChangeControlsd_x64_vc15.lib;CHLightControlsd_x64_vc15.lib;CHAfmControlsd_x64_vc15.lib;CHSignalControlsd_x64_vc15.lib;CHVcrControlsd_x64_vc15.lib;CHWsiControlsd_x64_vc15.lib;CHTotalPitchMeasured_x64_vc15.lib;M_AutoDiagnosisManagerd_x64_vc17.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>../lib;../../Internal_Library/lib;../../External_Library/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
@@ -252,6 +252,7 @@
     <ClCompile Include="DlgModuleInfo.cpp" />
     <ClCompile Include="DlgMotor.cpp" />
     <ClCompile Include="DlgMotorControl.cpp" />
+    <ClCompile Include="DlgMotorOffSetTool.cpp" />
     <ClCompile Include="DlgPlcSignal.cpp" />
     <ClCompile Include="DlgResultGraph.cpp" />
     <ClCompile Include="DlgReviewCamera.cpp" />
@@ -347,6 +348,7 @@
     <ClInclude Include="DlgModuleInfo.h" />
     <ClInclude Include="DlgMotor.h" />
     <ClInclude Include="DlgMotorControl.h" />
+    <ClInclude Include="DlgMotorOffSetTool.h" />
     <ClInclude Include="DlgPlcSignal.h" />
     <ClInclude Include="DlgResultGraph.h" />
     <ClInclude Include="DlgReviewCamera.h" />
diff --git a/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj.filters b/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj.filters
index 9174e2e..314804c 100644
--- a/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj.filters
+++ b/ReviewSystem/ReviewSystem/ReviewSystem.vcxproj.filters
@@ -279,6 +279,9 @@
     <ClCompile Include="DlgHardwareSettingMode.cpp">
       <Filter>�냼�뒪 �뙆�씪</Filter>
     </ClCompile>
+    <ClCompile Include="DlgMotorOffSetTool.cpp">
+      <Filter>�냼�뒪 �뙆�씪</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="CameraControlAlign.h">
@@ -557,6 +560,9 @@
     <ClInclude Include="DlgHardwareSettingMode.h">
       <Filter>�뿤�뜑 �뙆�씪</Filter>
     </ClInclude>
+    <ClInclude Include="DlgMotorOffSetTool.h">
+      <Filter>�뿤�뜑 �뙆�씪</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="res\ReviewSystem.ico">
diff --git a/ReviewSystem/ReviewSystem/ReviewSystemView.cpp b/ReviewSystem/ReviewSystem/ReviewSystemView.cpp
index 0df4407..75ac167 100644
--- a/ReviewSystem/ReviewSystem/ReviewSystemView.cpp
+++ b/ReviewSystem/ReviewSystem/ReviewSystemView.cpp
@@ -494,7 +494,13 @@
 
 	//	m_DlgOffSetTool->ShowWindow(SW_SHOW);
 
+		/* < KEJ 20230621 - #4528 ADD Start > */
 
+		//Motor OffsetTool �깮�꽦
+		m_DlgMotorOffSetTool = new CDlgMotorOffSetTool(this);
+		m_DlgMotorOffSetTool->Create(IDD_DLG_MOTOR_OFFSET_TOOL, this);
+		m_DlgMotorOffSetTool->SetDMO2P(static_cast<IDialogMotorOffSet2Parent*>(pMainFrame));
+		/* < KEJ 20230621 - #4528 ADD End > */
 	}
 
 
@@ -696,6 +702,14 @@
 		delete m_DlgHistoryTool;
 		m_DlgHistoryTool = NULL;
 	}
+	/* < KEJ 20230621 - #4528 ADD Start > */
+	if (m_DlgMotorOffSetTool)
+	{
+		m_DlgMotorOffSetTool->DestroyWindow();
+		delete m_DlgMotorOffSetTool;
+		m_DlgMotorOffSetTool = NULL;
+	}
+	/* < KEJ 20230621 - #4528 ADD End > */
 
 	TRACE(_T("[A2E]DeleteDialogs 醫낅즺\n"));
 }
@@ -929,6 +943,12 @@
 {
 	m_DlgHardWareSettingMode->ShowWindow(SW_SHOW);
 }
+/* < KEJ 20230621 - #4528 ADD Start > */
+void CReviewSystemView::ShowMotorOffSetTool()
+{
+	m_DlgMotorOffSetTool->ShowWindow(SW_SHOW);
+}
+/* < KEJ 20230621 - #4528 ADD End > */
 
 //181203
 BOOL CReviewSystemView::SaveDefectMap( const CString& strPath )
diff --git a/ReviewSystem/ReviewSystem/ReviewSystemView.h b/ReviewSystem/ReviewSystem/ReviewSystemView.h
index b6848ce..98fd737 100644
--- a/ReviewSystem/ReviewSystem/ReviewSystemView.h
+++ b/ReviewSystem/ReviewSystem/ReviewSystemView.h
@@ -33,6 +33,7 @@
 #include "DlgReviewOffSetTool.h"
 #include "DlgReviewHistoryTool.h"
 #include "DlgHardwareSettingMode.h"
+#include "DlgMotorOffSetTool.h"		//< KEJ 20230621 - #4528 ADD >
 
 class CSys_SystemManager;
 class CSys_GlassTypeManager;
@@ -104,9 +105,11 @@
 	/*< LYW 20211112 - #3708 ADD Start >*/
 	void ShowHWSettingMode();
 	/*< LYW 20211112 - #3708 ADD End >*/
+	void ShowMotorOffSetTool();		//< KEJ 20230621 - #4528 ADD >
 	DlgReviewOffSetTool* GetReviewOffSetToolHandle() { return m_DlgOffSetTool; }
 
 	CDlgReviewHistoryTool* GetReviewHistoryToolHandle() { return m_DlgHistoryTool; }
+	CDlgMotorOffSetTool* GetMotorOffSetToolHandle() { return m_DlgMotorOffSetTool; }		//< KEJ 20230621 - #4528 ADD >
 
 	BOOL SaveDefectMap(const CString& strPath);
 	
@@ -165,6 +168,7 @@
 	BOOL					isReviewPopUp;
 	DlgReviewOffSetTool*	m_DlgOffSetTool;
 	CDlgReviewHistoryTool*	m_DlgHistoryTool;	
+	CDlgMotorOffSetTool*	m_DlgMotorOffSetTool;		//< KEJ 20230621 - #4528 ADD >
 	/*< LYW 20211112 - #3708 ADD Start >*/
 	DlgHardwareSettingMode* m_DlgHardWareSettingMode;
 	/*< LYW 20211112 - #3708 ADD End >*/
diff --git a/ReviewSystem/ReviewSystem/SequenceProcessor.cpp b/ReviewSystem/ReviewSystem/SequenceProcessor.cpp
index bb8d7f2..ddeb1d9 100644
--- a/ReviewSystem/ReviewSystem/SequenceProcessor.cpp
+++ b/ReviewSystem/ReviewSystem/SequenceProcessor.cpp
@@ -2009,6 +2009,8 @@
 				// set offset
 				ApplyMotorOffset(pWsi->nModuleIdx, -1, MotorOffsetCamera + MotorOffsetWSI+MotorOffset_Glass, dDefectPosX, dDefectPosY);
 
+				m_pSP2P->CalcMotorOffSetValue(pWsi->nModuleIdx, dDefectPosX, dDefectPosY);		//< KEJ 20230622 - #4526 ADD >
+
 				// motor calibrate
 				CalibrateMotorPos(pWsi->nModuleIdx, dDefectPosX, dDefectPosY);
 				
diff --git a/ReviewSystem/ReviewSystem/SequenceProcessor.h b/ReviewSystem/ReviewSystem/SequenceProcessor.h
index d3dfc9c..1507c1e 100644
--- a/ReviewSystem/ReviewSystem/SequenceProcessor.h
+++ b/ReviewSystem/ReviewSystem/SequenceProcessor.h
@@ -511,6 +511,7 @@
 
 
 	virtual BOOL						GetOffSetValue(int nModule, int nCam, int nScan, double dGlassXPos, double &dXpos, double &dYpos) = 0;
+	virtual BOOL						CalcMotorOffSetValue(int nModule, double &dXpos, double &dYpos) = 0;
 
 public:
 	virtual BOOL ISP2P_MakeDirectory(CString strPath) {return TRUE;};
diff --git a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
index 4885de2..ef642c6 100644
--- a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
+++ b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
@@ -4376,6 +4376,7 @@
 			// set offset
 			ApplyMotorOffset(pReview->nModuleIdx, pReview->nZoomIdx, MotorOffsetCamera + MotorOffsetMag+MotorOffset_Glass, dDefectPosX, dDefectPosY);
 		
+			m_pSP2P->CalcMotorOffSetValue(pReview->nModuleIdx, dDefectPosX, dDefectPosY);		//< KEJ 20230622 - #4526 ADD >
 			//xpostemp = dDefectPosX;
 			//ypostemp = dDefectPosY;
 
@@ -4676,6 +4677,7 @@
 			// set offset
 			ApplyMotorOffset(pReview->nModuleIdx, pReview->nZoomIdx, MotorOffsetCamera + MotorOffsetMag + MotorOffset_Glass, dDefectPosX, dDefectPosY);
 
+			m_pSP2P->CalcMotorOffSetValue(pReview->nModuleIdx, dDefectPosX, dDefectPosY);		//< KEJ 20230622 - #4526 ADD >
 			//xpostemp = dDefectPosX;
 			//ypostemp = dDefectPosY;
 
@@ -4933,6 +4935,8 @@
 			// set offset
 			ApplyMotorOffset(pWsi->nModuleIdx, -1, MotorOffsetCamera + MotorOffsetWSI + MotorOffset_Glass, dDefectPosX, dDefectPosY);
 
+			m_pSP2P->CalcMotorOffSetValue(pWsi->nModuleIdx, dDefectPosX, dDefectPosY);		//< KEJ 20230622 - #4526 ADD >
+
 			m_pSP2P->GetOffSetValue(nModuleIdx, pWsi->nAOICameraIdx, pWsi->nAOIScanIdx, pWsi->nUMOriginX / 1000.0, xpostemp, ypostemp);
 
 			xpostemp = floor(xpostemp * 1000);
diff --git a/ReviewSystem/ReviewSystem/resource.h b/ReviewSystem/ReviewSystem/resource.h
index 2fe97fb..8976ab8 100644
--- a/ReviewSystem/ReviewSystem/resource.h
+++ b/ReviewSystem/ReviewSystem/resource.h
@@ -1,6 +1,6 @@
 //{{NO_DEPENDENCIES}}
-// Microsoft Visual C++�뿉�꽌 �깮�꽦�븳 �룷�븿 �뙆�씪�엯�땲�떎.
-// ReviewSystem.rc�뿉�꽌 �궗�슜�릺怨� �엳�뒿�땲�떎.
+// Microsoft Visual C++에서 생성한 포함 파일입니다.
+// ReviewSystem.rc에서 사용되고 있습니다.
 //
 #define IDCANCEL                        2
 #define IDD_ABOUTBOX                    100
@@ -8,8 +8,6 @@
 #define IDD_REVIEWSYSTEM_FORM           101
 #define IDD_DLG_RESULT_GRAPH            103
 #define IDR_POPUP_EDIT                  119
-#define ID_STATUSBAR_PANE1              120
-#define ID_STATUSBAR_PANE2              121
 #define IDS_STATUS_PANE1                122
 #define IDS_STATUS_PANE2                123
 #define IDS_TOOLBAR_STANDARD            124
@@ -68,6 +66,7 @@
 #define IDD_DLG_DEFECT_MAP_TAB          374
 #define IDD_DLG_ALIGN_TAB               376
 #define IDB_BITMAP2                     379
+#define IDD_DLG_MOTOR_OFFSET_TOOL       380
 #define IDD_DLG_HARDWARE_SETTING_MODE   381
 #define IDC_RADIO1                      1001
 #define IDC_RADIO_ZOOM_LEVEL_0          1001
@@ -80,8 +79,6 @@
 #define IDC_RADIO_ZOOM_LEVEL_2          1003
 #define IDC_RADIO_MAP_TYPE_1            1003
 #define IDC_RADIO_IMAGE_MODE_2          1003
-#define IDC_CHECK1                      1004
-#define IDC_CHECK_CAMERA_CONTROL        1004
 #define IDC_RADIO_MAP_TYPE_3            1004
 #define IDC_RADIO_IMAGE_MODE_3          1004
 #define IDC_CHECK_REDUCE                1004
@@ -95,17 +92,9 @@
 #define IDC_IMAGE_FLIP                  1005
 #define IDC_SLIDER2                     1006
 #define IDC_SLIDER_EXPOSURE_TIME        1006
-#define IDC_CHECK_AFM_TRACKING          1006
 #define IDC_BUTTON_UI_RIGHT1            1006
-#define IDC_CHECK2                      1007
-#define IDC_CHECK_MEASURE_POINT         1007
-#define IDC_CHECK_JOG_UP                1007
 #define IDC_RADIO_ZOOM_LEVEL_3          1007
 #define IDC_USE_DEFECT                  1007
-#define IDC_BUTTON2                     1008
-#define IDC_CHECK_MEASURE_POINT2        1008
-#define IDC_CHECK_CAMERA_RANGE          1008
-#define IDC_CHECK_REVIEW_PATH           1008
 #define IDC_CHECK_DRAW_REVIEW_PATH      1008
 #define IDC_SLIDER_LIGHT_LEVEL_1        1008
 #define IDC_SLIDER_LIGHT_LEVEL_TRANS    1008
@@ -114,46 +103,35 @@
 #define IDC_BUTTON_PROGRAMEXIT          1008
 #define IDC_BUTTON_ALIGNCAM_GRAB        1008
 #define IDC_SPIN2                       1009
-#define IDC_CHECK_REVIEW_PATH2          1009
-#define IDC_CHECK_AUTO_SELECT_CAMERA    1009
 #define IDC_CHECK_DRAW_SELECTED_DEFECT  1009
 #define IDC_BUTTON_APPLY_GRID_DATA      1009
 #define IDC_STATIC_ALIGN_RESULT         1010
-#define IDC_CHECK_REVIEW_PATH3          1010
 #define IDC_CHECK_DRAW_WSI_PATH         1010
 #define IDC_BUTTON_APPLT_OFFSET_PARAM   1010
 #define IDC_BUTTON_PREV_IMAGE           1011
 #define IDC_STATIC_ALIGN_ANGLE          1011
 #define IDC_BUTTON_PREV_BUFFER          1011
-#define IDC_CHECK_REVIEW_PATH4          1011
 #define IDC_CHECK_DRAW_CELL             1011
 #define IDC_STATIC_SIGNAL_SIGNAL_LOADING 1012
 #define IDC_BUTTON_NEXT_IMAGE           1012
 #define IDC_STATIC_ALIGN_DXDY           1012
 #define IDC_BUTTON_NEXT_BUFFER          1012
 #define IDC_STATIC_ALIGN_DX             1012
-#define IDC_CHECK_REVIEW_PATH5          1012
 #define IDC_CHECK_DRAW_DEFECT           1012
 #define IDC_BUTTON_JOG_UP               1013
 #define IDC_STATIC_ALIGN_DY             1013
-#define IDC_CHECK_REVIEW_PATH6          1013
-#define IDC_CHECK_CAMERA_POSITION       1013
 #define IDC_CHECK_DRAW_CAMERA_POSITION  1013
 #define IDC_STATIC_SIGNAL_SIGNAL_REVIEW_START 1014
 #define IDC_BUTTON_JOG_DOWN             1014
 #define IDC_STATIC_ALIGN_OX             1014
-#define IDC_CHECK_REVIEW_PATH7          1014
-#define IDC_CHECK_DRAW_RULER            1014
 #define IDC_CHECK_USE_WSI               1014
 #define IDC_STATIC_SIGNAL_SIGNAL_REVIEW_END 1015
 #define IDC_STATIC_ALIGN_OY             1015
-#define IDC_CHECK_REVIEW_PATH8          1015
 #define IDC_CHECK_DRAW_REVIEW_DEFECT    1015
 #define IDC_STATIC_SIGNAL_SIGNAL_UNLOADING 1016
 #define IDC_CHECK_DRAW_WSI_DEFECT       1016
 #define IDC_CHECK_DRAW_USER_PATH        1017
 #define IDC_STATIC_SIGNAL_SIGNAL_VCR_READ 1017
-#define IDC_CHECK_DRAW_WSI_PATH3        1018
 #define IDC_CHECK_DRAW_MEASURE_PATH     1018
 #define IDC_CHECK_USE_WSI_MEASUREMENT   1019
 #define IDC_EDIT_GO_POS_X               1022
@@ -163,24 +141,15 @@
 #define IDC_LIST_DEFECT                 1036
 #define IDC_BUTTON_MOTOR_GO_XY          1037
 #define IDC_LIST_LOG                    1038
-#define IDC_BUTTON_UI_EXPAND            1038
 #define IDC_CHECK_UI_REDUCE             1038
-#define IDC_CHECK_TYPE_B                1039
 #define OnBnClickedButtonUiRight        1039
-#define IDC_BUTTON_UI_RIGHT             1039
-#define IDC_CHECK_TYPE_B2               1040
-#define IDC_CHECK_TYPE_W                1040
 #define IDC_STATIC_MEASURE_GRAPH        1040
 #define IDC_STATIC_GRAPH_VIEW           1040
 #define IDC_COMBO_VIEW_FIRST            1041
-#define IDC_COMBO2                      1042
-#define IDC_COMBO_VIEW_SECOND           1042
 #define IDC_GRID_MAP_OPTION             1042
 #define IDC_COMBO_SELECT_MODULE         1042
 #define IDC_STATIC_DATE_TIME            1043
 #define IDC_STATIC_VERSION              1044
-#define IDC_COMBO1                      1044
-#define IDC_COMBO_VIEW_MODE             1044
 #define IDC_COMBO_MODE                  1044
 #define IDC_COMBO_FLANTESS_MODE         1044
 #define IDC_COMBO_MODULE_INDEX          1044
@@ -199,7 +168,6 @@
 #define IDC_STATIC_VERSION4             1049
 #define IDC_EDIT_WSI_RTB_01             1049
 #define IDC_EDIT_SCAN_INDEX             1049
-#define IDC_BUTTON3                     1050
 #define IDC_BUTTON_LONG_RUN_STOP        1050
 #define IDC_STATIC_TOTAL_DEFECT2        1050
 #define IDC_STATIC_TOTAL_DEFECT         1050
@@ -220,29 +188,21 @@
 #define IDC_STATIC_MACHINETYPE          1053
 #define IDC_EDIT8                       1053
 #define IDC_GRID_AFM_INFO               1054
-#define IDC_EDIT9                       1054
 #define IDC_EDIT10                      1055
 #define IDC_EDIT11                      1056
 #define IDC_EDIT12                      1057
 #define IDC_STATIC_X_JOG_PLUS           1058
-#define IDC_EDIT15                      1058
 #define IDC_STATIC_Y_JOG_PLUS           1059
 #define IDC_EDIT14                      1059
 #define IDC_STATIC_R_JOG_PLUS           1060
 #define IDC_EDIT13                      1060
 #define IDC_STATIC_X_JOG_MINUS          1061
-#define IDC_EDIT17                      1061
 #define IDC_STATIC_Y_JOG_MINUS          1062
-#define IDC_EDIT18                      1062
 #define IDC_STATIC_R_JOG_MINUS          1063
-#define IDC_EDIT19                      1063
 #define IDC_BUTTON_ALIGN_PROCESS        1064
-#define IDC_EDIT20                      1064
 #define IDC_STATIC_SIGNAL_SIGNAL_ALIGN_START 1065
-#define IDC_EDIT21                      1065
 #define IDC_STATIC_SIGNAL_SIGNAL_READ_RAWFILE 1066
 #define IDC_TAB_CONTROL                 1067
-#define IDC_CHECK_DIGITAL_ZOOM          1068
 #define IDC_SLIDER_JOG_SPEED            1069
 #define IDC_GRID_CAMERA_POS             1070
 #define IDC_RADIO_MAP_TYPE_4            1071
@@ -258,20 +218,16 @@
 #define IDC_BUTTON_GLASS_GO_XY          1090
 #define IDC_EDIT_REVIEW_CAMCOUNT        1090
 #define IDC_EDIT_WSI_HEIGHT5            1090
-#define IDC_BUTTON_TEST1                1091
 #define IDC_KEY_JOD_MOVE                1091
 #define IDC_EDIT_JUDGE_DATA_Z_RANGE     1091
-#define IDC_EDIT16                      1091
 #define IDC_EDIT_SETTINGFILE_PATH       1091
 #define IDC_EDIT_WSI_HEIGHT6            1091
-#define IDC_BUTTON_GLASS_GO_XY3         1092
 #define IDC_BUTTON_TEST2                1092
 #define IDC_EDIT_XPOS_COUNT             1092
 #define IDC_EDIT_WSI_HEIGHT7            1092
 #define IDC_CHECK_AFM_TRACK             1093
 #define IDC_EDIT_RANGE_COUNT_FLATNESS   1093
 #define IDC_EDIT_WSI_HEIGHT8            1093
-#define IDC_BUTTON_GLASS_GO_XY2         1094
 #define IDC_BUTTON_GLASSCENTER_GO_XY    1094
 #define IDC_EDIT_GLASS_SIZE_X           1094
 #define IDC_EDIT_WSI_HEIGHT9            1094
@@ -302,14 +258,11 @@
 #define IDC_GRID_MOTOR_POS2             1106
 #define IDC_GRID_GLASS_POS              1106
 #define IDC_EDIT_REVIEW_PANEL_POS_X3    1106
-#define IDC_CHECK3                      1107
 #define IDC_GRID_GLASSCENTER_POS        1107
 #define IDC_EDIT_REVIEW_PANEL_POS_Y3    1107
 #define IDC_EDIT_REVIEW_PANEL_POS_X4    1108
-#define IDC_BUTTON1                     1109
 #define IDC_BUTTON_VERSION              1109
 #define IDC_INS_HOOK                    1109
-#define IDC_BUTTON_REDUCE               1109
 #define IDC_BUTTON_GET_TEMPLETE_IMAGE   1109
 #define IDC_BUTTON_MANUAL               1109
 #define IDC_BT_REVIEW_POPUP             1109
@@ -320,7 +273,6 @@
 #define IDC_BUTTON_AFM_CONNECT          1109
 #define IDC_GRID_ALIGN_INFO             1110
 #define IDC_EDIT_UPDATE_NOTE            1110
-#define IDC_BUTTON4                     1110
 #define IDC_UNINS_HOOK                  1110
 #define IDC_BUTTON_RIGHT                1110
 #define IDC_BUTTON_SIMULATION           1110
@@ -342,10 +294,8 @@
 #define IDC_GO_WSI                      1116
 #define IDC_CHECK_USE_WSI_CONTROL       1116
 #define IDC_BUTTON_ALIGN_CAM_DISCONNECT 1116
-#define IDC_CHECK4                      1117
 #define IDC_SELECT_OFFSET_ON            1117
 #define IDC_BUTTON_REVIEW_CAM_CONNECT   1117
-#define IDC_CHECK5                      1118
 #define IDC_NOT_USE_CENTER_POS          1118
 #define IDC_CHECK_USE_SIMULATION        1118
 #define IDC_BUTTON_REVIEW_CAM_DISCONNECT 1120
@@ -406,6 +356,7 @@
 #define IDC_EDIT_GANTRY_MOTOR_Y4        1158
 #define IDC_EDIT_OFFSET_Y_VALUE         1159
 #define IDC_EDIT_GANTRY_PIXEL_X4        1159
+#define IDC_BUTTON_MOTOR_OFFSET_TOOL    1159
 #define IDC_EDIT_CAMERA_COUNT           1160
 #define IDC_EDIT_GANTRY_PIXEL_Y4        1160
 #define IDC_PROGRESS_PROCESS            1161
@@ -443,18 +394,19 @@
 #define IDC_OFFSET_LOAD                 1185
 #define IDC_EDIT_WARN_STANDARD          1186
 #define IDC_EDIT_HARD_STANDARD          1187
-#define IDC_BUTTON_STANDARD_SAVE        1188
 #define IDC_STATIC_REVIEW_CAMERA        1189
-#define ID_INS_HOOK                     32772
-#define ID_UNINS_HOOK                   32773
+#define IDC_EDIT_MOTOR_OFFSET_COUNTX    1190
+#define IDC_EDIT_MOTOR_OFFSET_COUNTY    1191
+#define IDC_GRID_MOTOR_OFFSET_INFO      1192
+#define IDC_COMBO_MOTOR_OFFSET_MODULEIDX 1193
 
 // Next default values for new objects
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        383
+#define _APS_NEXT_RESOURCE_VALUE        385
 #define _APS_NEXT_COMMAND_VALUE         32775
-#define _APS_NEXT_CONTROL_VALUE         1190
+#define _APS_NEXT_CONTROL_VALUE         1194
 #define _APS_NEXT_SYMED_VALUE           346
 #endif
 #endif
diff --git a/ReviewSystem/ReviewSystem/stdafx.h b/ReviewSystem/ReviewSystem/stdafx.h
index 7f74d18..9036c4b 100644
--- a/ReviewSystem/ReviewSystem/stdafx.h
+++ b/ReviewSystem/ReviewSystem/stdafx.h
@@ -181,7 +181,25 @@
 #define  WM_OFFSETTOOL_MESSAGE2 (WM_USER + 9998)
 #define  WM_OFFSETTOOL_MESSAGE (WM_USER + 9999)
 
+/* < KEJ 20230621 - #4528 ADD Start > */
+enum OFFSETCOUNT {
+	CAM_MAX_COUNT = 20, XPOS_MAX_COUNT = 10, YPOS_MAX_COUNT = 10, SCAN_MAX_COUNT = 10, AOI_MAX_COUNT = 10, PROGRESS_BAR_MAX = 2000
+};
 
+enum COLORTYPE {
+	FFA7A7 = RGB(255, 167, 167),
+	FFC19E = RGB(255, 193, 158),
+	FFE08C = RGB(255, 224, 140),
+	FAED7D = RGB(250, 237, 125),
+	FFB2F5 = RGB(255, 178, 245),
+
+	A566FF = RGB(165, 102, 255),
+	D9418C = RGB(217, 65, 140),
+	A00D8FF = RGB(0, 216, 255),
+	A2F9D27 = RGB(47, 157, 39),
+	A4641D9 = RGB(70, 65, 217)
+};
+/* < KEJ 20230621 - #4528 ADD End > */
 
 #include <GdiPlus.h>
 using namespace Gdiplus;
diff --git a/ReviewSystem/bin/CHAfmControlsd_x64_vc15.dll b/ReviewSystem/bin/CHAfmControlsd_x64_vc15.dll
index 925a5ff..60d4ea3 100644
--- a/ReviewSystem/bin/CHAfmControlsd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHAfmControlsd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHAfmControlsd_x64_vc15.pdb b/ReviewSystem/bin/CHAfmControlsd_x64_vc15.pdb
index 8fb1fc3..eebb8a7 100644
--- a/ReviewSystem/bin/CHAfmControlsd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHAfmControlsd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHAlignFinderd_x64_vc15.dll b/ReviewSystem/bin/CHAlignFinderd_x64_vc15.dll
index 4ae7d68..9fbd7d7 100644
--- a/ReviewSystem/bin/CHAlignFinderd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHAlignFinderd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHAlignFinderd_x64_vc15.pdb b/ReviewSystem/bin/CHAlignFinderd_x64_vc15.pdb
index cb3cc14..df8ed18 100644
--- a/ReviewSystem/bin/CHAlignFinderd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHAlignFinderd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHAutoLightControls_x64_vc15.dll b/ReviewSystem/bin/CHAutoLightControls_x64_vc15.dll
index 1b34a35..04cc84c 100644
--- a/ReviewSystem/bin/CHAutoLightControls_x64_vc15.dll
+++ b/ReviewSystem/bin/CHAutoLightControls_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHAutoLightControls_x64_vc15.pdb b/ReviewSystem/bin/CHAutoLightControls_x64_vc15.pdb
index 3fcf004..081449e 100644
--- a/ReviewSystem/bin/CHAutoLightControls_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHAutoLightControls_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.dll b/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.dll
index 443f66a..4ef2324 100644
--- a/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.pdb b/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.pdb
index 865ef26..4765fa1 100644
--- a/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHAutoLightControlsd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHCommonControls_x64_vc15.dll b/ReviewSystem/bin/CHCommonControls_x64_vc15.dll
index 5d7189a..eb3c17c 100644
--- a/ReviewSystem/bin/CHCommonControls_x64_vc15.dll
+++ b/ReviewSystem/bin/CHCommonControls_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHCommonControls_x64_vc15.pdb b/ReviewSystem/bin/CHCommonControls_x64_vc15.pdb
index f1a9be4..ef47317 100644
--- a/ReviewSystem/bin/CHCommonControls_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHCommonControls_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHCommonControlsd_x64_vc15.dll b/ReviewSystem/bin/CHCommonControlsd_x64_vc15.dll
index f13fbc4..1c2ab94 100644
--- a/ReviewSystem/bin/CHCommonControlsd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHCommonControlsd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHCommonControlsd_x64_vc15.pdb b/ReviewSystem/bin/CHCommonControlsd_x64_vc15.pdb
index 97309a6..df40e91 100644
--- a/ReviewSystem/bin/CHCommonControlsd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHCommonControlsd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHDefectPicker_x64_vc15.dll b/ReviewSystem/bin/CHDefectPicker_x64_vc15.dll
index 7bd2154..a896cdb 100644
--- a/ReviewSystem/bin/CHDefectPicker_x64_vc15.dll
+++ b/ReviewSystem/bin/CHDefectPicker_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHDefectPicker_x64_vc15.pdb b/ReviewSystem/bin/CHDefectPicker_x64_vc15.pdb
index 8566afc..5ba7994 100644
--- a/ReviewSystem/bin/CHDefectPicker_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHDefectPicker_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHDefectPickerd_x64_vc15.dll b/ReviewSystem/bin/CHDefectPickerd_x64_vc15.dll
index 37b6ade..9b1452b 100644
--- a/ReviewSystem/bin/CHDefectPickerd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHDefectPickerd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHDefectPickerd_x64_vc15.pdb b/ReviewSystem/bin/CHDefectPickerd_x64_vc15.pdb
index ebcb1ea..1a8bf94 100644
--- a/ReviewSystem/bin/CHDefectPickerd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHDefectPickerd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.dll b/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.dll
index eca0cbe..f22f069 100644
--- a/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.dll
+++ b/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.pdb b/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.pdb
index 494cca7..1ca3a49 100644
--- a/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHEdgeTriangle_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.dll b/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.dll
index 3b16615..b4ea66f 100644
--- a/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.dll
+++ b/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.pdb b/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.pdb
index 67db57a..52e87e2 100644
--- a/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHEdgeTriangled_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHLightControlsd_x64_vc15.dll b/ReviewSystem/bin/CHLightControlsd_x64_vc15.dll
index 425f9b0..fef9bc1 100644
--- a/ReviewSystem/bin/CHLightControlsd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHLightControlsd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHLightControlsd_x64_vc15.pdb b/ReviewSystem/bin/CHLightControlsd_x64_vc15.pdb
index f56fd7d..1d066ab 100644
--- a/ReviewSystem/bin/CHLightControlsd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHLightControlsd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.dll b/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.dll
index 709ab06..58bd58e 100644
--- a/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.dll
+++ b/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.pdb b/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.pdb
index 2b6f52e..7dad3e0 100644
--- a/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHMotorCalibrator_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.dll b/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.dll
index 85c1cb4..282ad12 100644
--- a/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.dll
+++ b/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.pdb b/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.pdb
index aeec0c2..dc9e461 100644
--- a/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHMotorCalibratord_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHMotorControlsd_x64_vc15.dll b/ReviewSystem/bin/CHMotorControlsd_x64_vc15.dll
index 58294bc..1637bc6 100644
--- a/ReviewSystem/bin/CHMotorControlsd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHMotorControlsd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHMotorControlsd_x64_vc15.pdb b/ReviewSystem/bin/CHMotorControlsd_x64_vc15.pdb
index 65e07b7..24ad2ac 100644
--- a/ReviewSystem/bin/CHMotorControlsd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHMotorControlsd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.dll b/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.dll
index eb1941b..c51ba1e 100644
--- a/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.pdb b/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.pdb
index decd86e..151371e 100644
--- a/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHResultFileManagerd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.dll b/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.dll
index 3dba596..6f62050 100644
--- a/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.pdb b/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.pdb
index c15d5e3..6447195 100644
--- a/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewDefectFinderd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.dll b/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.dll
index 86a08b8..0cd582a 100644
--- a/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.pdb b/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.pdb
index 3072804..08b52f4 100644
--- a/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewPrioritySorter_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.dll b/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.dll
index e05b9b0..9faf6d5 100644
--- a/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.pdb b/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.pdb
index e9301b1..fa69488 100644
--- a/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewPrioritySorterd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewReciped_x64_vc15.dll b/ReviewSystem/bin/CHReviewReciped_x64_vc15.dll
index dca5397..3813b17 100644
--- a/ReviewSystem/bin/CHReviewReciped_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewReciped_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewReciped_x64_vc15.pdb b/ReviewSystem/bin/CHReviewReciped_x64_vc15.pdb
index 3bce158..96e227c 100644
--- a/ReviewSystem/bin/CHReviewReciped_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewReciped_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResultParser_x64_vc15.dll b/ReviewSystem/bin/CHReviewResultParser_x64_vc15.dll
index f35e389..c8f7389 100644
--- a/ReviewSystem/bin/CHReviewResultParser_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewResultParser_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResultParser_x64_vc15.pdb b/ReviewSystem/bin/CHReviewResultParser_x64_vc15.pdb
index 1136850..f940b8f 100644
--- a/ReviewSystem/bin/CHReviewResultParser_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewResultParser_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.dll b/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.dll
index ae3a34e..46083f0 100644
--- a/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.pdb b/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.pdb
index d88d267..95993b5 100644
--- a/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewResultParserd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResult_x64_vc15.dll b/ReviewSystem/bin/CHReviewResult_x64_vc15.dll
index daff32d..fbc9334 100644
--- a/ReviewSystem/bin/CHReviewResult_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewResult_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResult_x64_vc15.pdb b/ReviewSystem/bin/CHReviewResult_x64_vc15.pdb
index afbaca6..8df7e6e 100644
--- a/ReviewSystem/bin/CHReviewResult_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewResult_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResultd_x64_vc15.dll b/ReviewSystem/bin/CHReviewResultd_x64_vc15.dll
index 3188df6..db551ca 100644
--- a/ReviewSystem/bin/CHReviewResultd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewResultd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewResultd_x64_vc15.pdb b/ReviewSystem/bin/CHReviewResultd_x64_vc15.pdb
index 028a78f..cef76c2 100644
--- a/ReviewSystem/bin/CHReviewResultd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewResultd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewSettingd_x64_vc15.dll b/ReviewSystem/bin/CHReviewSettingd_x64_vc15.dll
index d8e8c2e..30c75f1 100644
--- a/ReviewSystem/bin/CHReviewSettingd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHReviewSettingd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHReviewSettingd_x64_vc15.pdb b/ReviewSystem/bin/CHReviewSettingd_x64_vc15.pdb
index e619477..544b363 100644
--- a/ReviewSystem/bin/CHReviewSettingd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHReviewSettingd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHSignalControls_x64_vc15.dll b/ReviewSystem/bin/CHSignalControls_x64_vc15.dll
index edabec8..5faf4d8 100644
--- a/ReviewSystem/bin/CHSignalControls_x64_vc15.dll
+++ b/ReviewSystem/bin/CHSignalControls_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHSignalControls_x64_vc15.pdb b/ReviewSystem/bin/CHSignalControls_x64_vc15.pdb
index 9626f6f..5395600 100644
--- a/ReviewSystem/bin/CHSignalControls_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHSignalControls_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHSignalControlsd_x64_vc15.dll b/ReviewSystem/bin/CHSignalControlsd_x64_vc15.dll
index 83ff116..80fc08c 100644
--- a/ReviewSystem/bin/CHSignalControlsd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHSignalControlsd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHSignalControlsd_x64_vc15.pdb b/ReviewSystem/bin/CHSignalControlsd_x64_vc15.pdb
index b316feb..3865625 100644
--- a/ReviewSystem/bin/CHSignalControlsd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHSignalControlsd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.dll b/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.dll
index 0809e59..3b28229 100644
--- a/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.dll
+++ b/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.pdb b/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.pdb
index aa5984f..711479e 100644
--- a/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHTotalPitchMeasured_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.dll b/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.dll
index 1274769..96f7bbd 100644
--- a/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.dll
+++ b/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.pdb b/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.pdb
index 62ed98e..80679cc 100644
--- a/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHVirtualGlassMap_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.dll b/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.dll
index d63e245..1de4a02 100644
--- a/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.pdb b/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.pdb
index f6df8ae..3c375da 100644
--- a/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHVirtualGlassMapd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHWsiControls_x64_vc15.dll b/ReviewSystem/bin/CHWsiControls_x64_vc15.dll
index 1f5c2f9..4bca4e6 100644
--- a/ReviewSystem/bin/CHWsiControls_x64_vc15.dll
+++ b/ReviewSystem/bin/CHWsiControls_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHWsiControls_x64_vc15.pdb b/ReviewSystem/bin/CHWsiControls_x64_vc15.pdb
index 46d5d9f..0069d2b 100644
--- a/ReviewSystem/bin/CHWsiControls_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHWsiControls_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/CHWsiControlsd_x64_vc15.dll b/ReviewSystem/bin/CHWsiControlsd_x64_vc15.dll
index dd30519..0adf513 100644
--- a/ReviewSystem/bin/CHWsiControlsd_x64_vc15.dll
+++ b/ReviewSystem/bin/CHWsiControlsd_x64_vc15.dll
Binary files differ
diff --git a/ReviewSystem/bin/CHWsiControlsd_x64_vc15.pdb b/ReviewSystem/bin/CHWsiControlsd_x64_vc15.pdb
index dc05137..920e7ef 100644
--- a/ReviewSystem/bin/CHWsiControlsd_x64_vc15.pdb
+++ b/ReviewSystem/bin/CHWsiControlsd_x64_vc15.pdb
Binary files differ
diff --git a/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.dll b/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.dll
index 06d2022..ba7b2a7 100644
--- a/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.dll
+++ b/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.dll
Binary files differ
diff --git a/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.pdb b/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.pdb
index 59bb37c..4b4c4c8 100644
--- a/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.pdb
+++ b/ReviewSystem/bin/M_AutoDiagnosisManagerd_x64_vc17.pdb
Binary files differ
diff --git a/ReviewSystem/bin/ReviewRecipeEditor.exe b/ReviewSystem/bin/ReviewRecipeEditor.exe
index 5678a2b..835463e 100644
--- a/ReviewSystem/bin/ReviewRecipeEditor.exe
+++ b/ReviewSystem/bin/ReviewRecipeEditor.exe
Binary files differ
diff --git a/ReviewSystem/bin/ReviewRecipeEditor.pdb b/ReviewSystem/bin/ReviewRecipeEditor.pdb
index bc19ef6..2ead64e 100644
--- a/ReviewSystem/bin/ReviewRecipeEditor.pdb
+++ b/ReviewSystem/bin/ReviewRecipeEditor.pdb
Binary files differ
diff --git a/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.exe b/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.exe
index 6a85852..68b6ac1 100644
--- a/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.exe
+++ b/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.exe
Binary files differ
diff --git a/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.pdb b/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.pdb
index 31dc14e..7a1f03d 100644
--- a/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.pdb
+++ b/ReviewSystem/bin/ReviewRecipeEditord_x64_vc10.pdb
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystem.exe b/ReviewSystem/bin/ReviewSystem.exe
index 195b9fa..4f1c2cb 100644
--- a/ReviewSystem/bin/ReviewSystem.exe
+++ b/ReviewSystem/bin/ReviewSystem.exe
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystem.pdb b/ReviewSystem/bin/ReviewSystem.pdb
index aa837ae..8fb63d9 100644
--- a/ReviewSystem/bin/ReviewSystem.pdb
+++ b/ReviewSystem/bin/ReviewSystem.pdb
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystemSetting.exe b/ReviewSystem/bin/ReviewSystemSetting.exe
index d1fdb17..e77416e 100644
--- a/ReviewSystem/bin/ReviewSystemSetting.exe
+++ b/ReviewSystem/bin/ReviewSystemSetting.exe
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystemSetting.pdb b/ReviewSystem/bin/ReviewSystemSetting.pdb
index 1354c0e..d377496 100644
--- a/ReviewSystem/bin/ReviewSystemSetting.pdb
+++ b/ReviewSystem/bin/ReviewSystemSetting.pdb
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.exe b/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.exe
index 09381a6..12c58b1 100644
--- a/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.exe
+++ b/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.exe
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.pdb b/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.pdb
index c1834db..3652162 100644
--- a/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.pdb
+++ b/ReviewSystem/bin/ReviewSystemSettingd_x64_vc10.pdb
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystemd_x64_vc10.exe b/ReviewSystem/bin/ReviewSystemd_x64_vc10.exe
new file mode 100644
index 0000000..e0b1146
--- /dev/null
+++ b/ReviewSystem/bin/ReviewSystemd_x64_vc10.exe
Binary files differ
diff --git a/ReviewSystem/bin/ReviewSystemd_x64_vc10.pdb b/ReviewSystem/bin/ReviewSystemd_x64_vc10.pdb
index 47448da..dc66323 100644
--- a/ReviewSystem/bin/ReviewSystemd_x64_vc10.pdb
+++ b/ReviewSystem/bin/ReviewSystemd_x64_vc10.pdb
Binary files differ
diff --git a/ReviewSystem/lib/CHSignalControlsd_x64_vc15.lib b/ReviewSystem/lib/CHSignalControlsd_x64_vc15.lib
index 9627f63..c70efd1 100644
--- a/ReviewSystem/lib/CHSignalControlsd_x64_vc15.lib
+++ b/ReviewSystem/lib/CHSignalControlsd_x64_vc15.lib
Binary files differ

--
Gitblit v1.9.3