| 442 | } |
| 443 | |
| 444 | void _DestroyInplaceWindow() |
| 445 | { |
| 446 | if( m_hwndInplace != NULL && ::IsWindow(m_hwndInplace) ) { |
| 447 | // Find property |
| 448 | IProperty* prop = reinterpret_cast<IProperty*>(TBase::GetItemData(m_iInplaceIndex)); |
| 449 | ATLASSERT(prop); |
| 450 | BYTE bKind = prop->GetKind(); |
| 451 | // Set focus back to our control |
| 452 | if( ::GetFocus() != m_hWnd && IsChild(::GetFocus()) ) SetFocus(); |
| 453 | // Destroy control |
| 454 | switch( bKind ) { |
| 455 | case PROPKIND_CONTROL: |
| 456 | ::DestroyWindow(m_hwndInplace); |
| 457 | break; |
| 458 | default: |
| 459 | ::PostMessage(m_hwndInplace, WM_CLOSE, 0, 0L); |
| 460 | break; |
| 461 | } |
| 462 | } |
| 463 | m_hwndInplace = NULL; |
| 464 | m_iInplaceIndex = NULL; |
| 465 | } |
| 466 | |
| 467 | BOOL _SpawnInplaceWindow(IProperty* prop, HTREEITEM hItem) |
| 468 | { |
no test coverage detected