| 386 | } |
| 387 | |
| 388 | void EnableItem(HTREEITEM hItem, BOOL bState) |
| 389 | { |
| 390 | ATLASSERT(::IsWindow(m_hWnd)); |
| 391 | IProperty* prop = reinterpret_cast<IProperty*>(TBase::GetItemData(hItem)); |
| 392 | ATLASSERT(prop); |
| 393 | if( prop == NULL ) return; |
| 394 | prop->SetEnabled(bState); |
| 395 | // The checkmark/option tree-properties need special care, since |
| 396 | // they will not repaint correctly unless changing the value. |
| 397 | if( prop->GetKind() == PROPKIND_CHECK ) { |
| 398 | // Refresh image hack |
| 399 | CComVariant v; |
| 400 | prop->GetValue(&v); |
| 401 | prop->SetValue(v); |
| 402 | } |
| 403 | _InvalidateItem(hItem); |
| 404 | } |
| 405 | |
| 406 | // Implementation |
| 407 |
nothing calls this directly
no test coverage detected