| | |
| | | |
| | | // 创建Job Existence Slots控件 |
| | | m_ctrlJobSlotGrid.Create(AfxRegisterWndClass(0), _T("JobSlotGrid"), |
| | | WS_CHILD | WS_VISIBLE, CRect(0, 0, 100, 100), this, 1001); |
| | | m_ctrlJobSlotGrid.SetGridSize(12, 16); |
| | | WS_CHILD | WS_VISIBLE, CRect(0, 0, 88, 32), this, 1001); |
| | | m_ctrlJobSlotGrid.SetGridSize(1, 8); |
| | | m_ctrlJobSlotGrid.SetColors(RGB(34, 177, 76), RGB(200, 200, 200)); |
| | | |
| | | m_ctrlJobSlotGrid.SetSlotStatus(0, 1, true); |
| | | m_ctrlJobSlotGrid.SetSlotStatus(1, 9, true); |
| | | m_ctrlJobSlotGrid.SetSlotStatus(4, 9, false); |
| | | m_ctrlJobSlotGrid.SetSlotStatus(4, 10, true, TRUE); |
| | | auto statusMap = m_pPort->getScanCassetteMap(); |
| | | for (int i = 0; i < 8; ++i) { |
| | | bool isSet = (statusMap >> i) & 1; |
| | | m_ctrlJobSlotGrid.SetSlotStatus(0, i, isSet); |
| | | } |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // 异常: OCX 属性页应返回 FALSE |
| | |
| | | GetClientRect(rcClient); |
| | | |
| | | m_ctrlJobSlotGrid.MoveWindow(rcComboBox.left, rcLabel.top, |
| | | rcClient.right - 22 - rcComboBox.left, rcClient.bottom - 12 - rcLabel.top); |
| | | 34 * 8, 32); |
| | | } |