| | |
| | | unsigned int nSize = attrubutes.size(); |
| | | for (unsigned int i = 0; i < nSize; i++) { |
| | | SERVO::CAttribute* pAttribute = attrubutes.getAttribute(i); |
| | | |
| | | m_gridCtrl.AddProperty(new CMFCPropertyGridProperty( |
| | | CMFCPropertyGridProperty* pProperty = new CMFCPropertyGridProperty( |
| | | pAttribute->getName().c_str(), |
| | | pAttribute->getValue().c_str(), |
| | | pAttribute->getDescription().c_str())); |
| | | pAttribute->getDescription().c_str()); |
| | | pProperty->AllowEdit(TRUE); |
| | | m_gridCtrl.AddProperty(pProperty); |
| | | } |
| | | } |
| | | |
| | |
| | | pItem = GetDlgItem(IDC_LINE1); |
| | | pItem->MoveWindow(rcClient.right - 3, 0, 3, rcClient.Height()); |
| | | |
| | | int x2 = rcClient.right - 6; |
| | | int y = 3; |
| | | 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()); |
| | | pItem->MoveWindow(x2 - rcItem.Width(), y, rcItem.Width(), rcItem.Height()); |
| | | x2 -= rcItem.Width(); |
| | | x2 -= 3; |
| | | |
| | | pItem = GetDlgItem(IDC_LABEL_TITLE); |
| | | pItem->GetWindowRect(&rcItem); |
| | | pItem->MoveWindow(5, y, x2 - 5, rcItem.Height()); |
| | | y += rcItem.Height(); |
| | | y += 3; |
| | | y += 8; |
| | | |
| | | |
| | | GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 13, rcClient.Height() - 3 - y); |
| | | } |