| 1830 | } |
| 1831 | } |
| 1832 | BOOL CPanel::AddChild(CPanel * pChild) |
| 1833 | { |
| 1834 | if (pChild->Parent != NULL) |
| 1835 | { |
| 1836 | BOOL bOk = pChild->Parent->RemoveChild(pChild); |
| 1837 | if (bOk == FALSE) |
| 1838 | { |
| 1839 | return FALSE; |
| 1840 | } |
| 1841 | } |
| 1842 | pChild->LeftOffset = pChild->left - this->left; |
| 1843 | pChild->TopOffset = pChild->top - this->top; |
| 1844 | pChild->RightOffset = this->right - pChild->right; |
| 1845 | pChild->BottomOffset = this->bottom - pChild->bottom; |
| 1846 | |
| 1847 | pChild->Parent = this; |
| 1848 | |
| 1849 | Children.AddTail( pChild ); |
| 1850 | return TRUE; |
| 1851 | } |
| 1852 | |
| 1853 | BOOL CPanel::RemoveChild(CPanel * pChild) |
| 1854 | { |
no test coverage detected