MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / EnableItem

Function EnableItem

Libraries/PropertyGrid/PropertyTree.h:388–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

SetEnabledMethod · 0.80
GetItemDataFunction · 0.70
_InvalidateItemFunction · 0.70
GetKindMethod · 0.45
GetValueMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected