| | |
| | | ON_WM_DESTROY() |
| | | ON_WM_SIZE() |
| | | ON_NOTIFY(BYVERTICALLINE_MOVEX, IDC_LINE1, &CPanelAttributes::OnVLineMoveX) |
| | | ON_BN_CLICKED(IDC_BUTTON_CLOSE, &CPanelAttributes::OnBnClickedButtonClose) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | |
| | | for (unsigned int i = 0; i < nSize; i++) { |
| | | SERVO::CAttribute* pAttribute = attrubutes.getAttribute(i); |
| | | |
| | | CMFCPropertyGridProperty* pProp1 = new CMFCPropertyGridProperty( |
| | | m_gridCtrl.AddProperty(new CMFCPropertyGridProperty( |
| | | pAttribute->getName().c_str(), |
| | | pAttribute->getValue().c_str(), |
| | | pAttribute->getDescription().c_str()); |
| | | m_gridCtrl.AddProperty(pProp1); |
| | | pAttribute->getDescription().c_str())); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | CDialogEx::OnInitDialog(); |
| | | |
| | | |
| | | // 关闭按钮 |
| | | CString strIcon1; |
| | | strIcon1.Format(_T("%s\\Res\\panel_close_24_b.ico"), theApp.m_strAppDir); |
| | | HICON hIcon1 = (HICON)::LoadImage(AfxGetInstanceHandle(), |
| | | strIcon1, IMAGE_ICON, 24, 24, |
| | | LR_LOADFROMFILE | LR_DEFAULTCOLOR | LR_CREATEDIBSECTION | LR_DEFAULTSIZE); |
| | | m_btnClose.SubclassDlgItem(IDC_BUTTON_CLOSE, this); |
| | | m_btnClose.SetIcon(hIcon1, hIcon1, 24); |
| | | m_btnClose.SetFaceColor(m_crBkgnd); |
| | | m_btnClose.SetFrameColor(m_crBkgnd); |
| | | m_btnClose.SetFrameColor(BS_HOVER, RGB(218, 218, 218)); |
| | | m_btnClose.SetFrameColor(BS_PRESS, RGB(168, 168, 168)); |
| | | |
| | | CVerticalLine* pLine1 = CVerticalLine::Hook(GetDlgItem(IDC_LINE1)->GetSafeHwnd()); |
| | | pLine1->SetBkgndColor(RGB(225, 225, 225)); |
| | |
| | | pItem = GetDlgItem(IDC_LABEL_TITLE); |
| | | pItem->GetWindowRect(&rcItem); |
| | | pItem->MoveWindow(5, y, rcClient.Width() - 8, rcItem.Height()); |
| | | |
| | | pItem = GetDlgItem(IDC_BUTTON_CLOSE); |
| | | pItem->GetWindowRect(&rcItem); |
| | | pItem->MoveWindow(rcClient.right - 6 - rcItem.Width(), y, rcItem.Width(), rcItem.Height()); |
| | | y += rcItem.Height(); |
| | | y += 3; |
| | | |
| | |
| | | |
| | | *result = 0; |
| | | } |
| | | |
| | | void CPanelAttributes::OnBnClickedButtonClose() |
| | | { |
| | | ShowWindow(SW_HIDE); |
| | | GetParent()->SendMessage(ID_MSG_PANEL_RESIZE, m_nPanelWidth, 0); |
| | | } |