// DlgAFMInfo_Non_VisionAlign.cpp : ±¸Çö ÆÄÀÏÀÔ´Ï´Ù. // #include "stdafx.h" #include "ReviewSystem.h" #include "DlgAFMInfo_Non_VisionAlign.h" #include "afxdialogex.h" // CDlgAFMInfo ´ëÈ­ »óÀÚÀÔ´Ï´Ù. IMPLEMENT_DYNAMIC(CDlgAFMInfo_Non_VisionAlign, CDialog) CDlgAFMInfo_Non_VisionAlign::CDlgAFMInfo_Non_VisionAlign(CWnd* pParent /*=NULL*/) { m_pSignalIOStatus = NULL; } CDlgAFMInfo_Non_VisionAlign::~CDlgAFMInfo_Non_VisionAlign() { } BEGIN_MESSAGE_MAP(CDlgAFMInfo_Non_VisionAlign, CDialog) ON_MESSAGE(UM_SIGNAL_IO_SIGNAL_UPDATE, &CDlgAFMInfo_Non_VisionAlign::OnPCControlIOSignalUpdate) END_MESSAGE_MAP() // CDlgAFMInfo ¸Þ½ÃÁö 󸮱âÀÔ´Ï´Ù. void CDlgAFMInfo_Non_VisionAlign::InitGridPCControlInfo() { enum { PCControl_INFO_GRID_ROW_COUNT = 15, PCControl_INFO_GRID_COL_COUNT = 4 }; int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols, nWidth, nFixWidth; CString strTemp; CRect rt; nRows = PCControl_INFO_GRID_ROW_COUNT; nCols = PCControl_INFO_GRID_COL_COUNT; nFixRows = 1; nFixCols = 1; nRowIdx = 0; nColIdx = 0; m_ctrlAFMInfo.GetClientRect(&rt); // m_ctrlGridAFMStateInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(0xFF, 0xFF, 0xFF)); m_ctrlAFMInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(248, 218, 169)); m_ctrlAFMInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(248, 218, 169)); m_ctrlAFMInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255)); m_ctrlAFMInfo.SetRowCount(nRows); m_ctrlAFMInfo.SetColumnCount(nCols); m_ctrlAFMInfo.SetFixedRowCount(0); m_ctrlAFMInfo.SetFixedColumnCount(0); m_ctrlAFMInfo.SetEditable(FALSE); m_ctrlAFMInfo.SetSelectedRange(0, 0, 0, 0, FALSE, FALSE); nFixWidth = 90; nWidth = (rt.Width() - (nFixWidth*2)) / (PCControl_INFO_GRID_COL_COUNT - 2); nWidth -= 2; GV_ITEM Item; //col Item.mask = GVIF_TEXT; Item.row = nRowIdx; Item.col = nColIdx; strTemp.Format(_T("BYPASS")); Item.strText = strTemp; m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth); m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.col = nColIdx; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth); m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255)); Item.col = nColIdx; strTemp.Format(_T("LoadSuccess")); Item.strText = strTemp; m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth); m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.col = nColIdx; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth); m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255)); //row nRowIdx = 1; nColIdx = 0; Item.col = nColIdx; Item.row = nRowIdx++; strTemp.Format(_T("AUTO")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("MANUAL")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("REVIEW")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("Loading")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("ReviewStart")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("ReviewEnd")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("Unloading")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); //row2 nRowIdx = 1; nColIdx = 2; Item.row = nRowIdx++; Item.col = nColIdx; strTemp.Format(_T("LoadFail")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("ReviewSuccess")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("ReviewFail")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("Light_Error")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("A/F_Error")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); Item.row = nRowIdx++; strTemp.Format(_T("")); Item.strText = strTemp; m_ctrlAFMInfo.SetItem(&Item); m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169)); for(int rowIdx = 0; rowIdx < PCControl_INFO_GRID_ROW_COUNT; rowIdx++) { m_ctrlAFMInfo.SetRowHeight(rowIdx, 21); } }