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

Function OnSelChanged

Libraries/PropertyGrid/PropertyTree.h:798–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796 }
797
798 LRESULT OnSelChanged(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
799 {
800 // No editor, please
801 _DestroyInplaceWindow();
802 IProperty* prop = NULL;
803 // Only items with selection...
804 HTREEITEM hItem = GetSelectedItem();
805 if( hItem != NULL ) {
806 prop = reinterpret_cast<IProperty*>(TBase::GetItemData(hItem));
807 ATLASSERT(prop);
808 if( prop->IsEnabled() ) {
809 _SpawnInplaceWindow(prop, hItem);
810 prop->Activate(PACT_ACTIVATE, 0);
811 if( (m_di.dwExtStyle & PTS_EX_SINGLECLICKEDIT) != 0 ) {
812 if( prop->GetKind() == PROPKIND_EDIT ) prop->Activate(PACT_DBLCLICK, 0);
813 }
814 }
815 }
816 // Let owner know
817 NMPROPERTYITEM nmh = { m_hWnd, GetDlgCtrlID(), PIN_SELCHANGED, prop };
818 ::SendMessage(GetParent(), WM_NOTIFY, nmh.hdr.idFrom, (LPARAM) &nmh);
819 return 0;
820 }
821
822 LRESULT OnExpanding(int /*idCtrl*/, LPNMHDR pnmh, BOOL& bHandled)
823 {

Callers

nothing calls this directly

Calls 6

IsEnabledMethod · 0.80
_DestroyInplaceWindowFunction · 0.70
GetItemDataFunction · 0.70
_SpawnInplaceWindowFunction · 0.70
ActivateMethod · 0.45
GetKindMethod · 0.45

Tested by

no test coverage detected