| | |
| | | pComboBox->SetCurSel(cassetteStatus - 1); |
| | | } |
| | | |
| | | // 创建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); |
| | | 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); |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // 异常: OCX 属性页应返回 FALSE |
| | |
| | | void CPagePortStatus::OnSize(UINT nType, int cx, int cy) |
| | | { |
| | | CHMPropertyPage::OnSize(nType, cx, cy); |
| | | if (GetDlgItem(IDC_COMBO_PORT_STATUS) == nullptr) return; |
| | | |
| | | // TODO: 在此处添加消息处理程序代码 |
| | | |
| | | // 创建Job Existence Slots控件 |
| | | CRect rcLabel, rcComboBox, rcClient; |
| | | GetDlgItem(IDC_LABEL_JOB_EXISTENCE_SLOTS)->GetWindowRect(&rcLabel); |
| | | ScreenToClient(rcLabel); |
| | | GetDlgItem(IDC_COMBO_CASSETTE_STATUS)->GetWindowRect(&rcComboBox); |
| | | ScreenToClient(rcComboBox); |
| | | GetClientRect(rcClient); |
| | | |
| | | m_ctrlJobSlotGrid.MoveWindow(rcComboBox.left, rcLabel.top, |
| | | rcClient.right - 22 - rcComboBox.left, rcClient.bottom - 12 - rcLabel.top); |
| | | } |