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

Function OnUpdateProperty

Libraries/PropertyGrid/PropertyTree.h:648–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

646 }
647
648 LRESULT OnUpdateProperty(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/)
649 {
650 // Updates a property value using an active editor window.
651 // The editor window uses this message to update the attached property class.
652 // Parameters:
653 // LPARAM = Window (HWND)
654 HWND hWnd = reinterpret_cast<HWND>(lParam);
655 ATLASSERT(::IsWindow(hWnd));
656 if( !::IsWindow(hWnd) || m_iInplaceIndex == NULL ) return 0;
657 IProperty* prop = reinterpret_cast<IProperty*>(TBase::GetItemData(m_iInplaceIndex));
658 if( prop == NULL ) return 0;
659 // Ask owner about change
660 NMPROPERTYITEM nmh = { m_hWnd, GetDlgCtrlID(), PIN_ITEMCHANGING, prop };
661 if( ::SendMessage(GetParent(), WM_NOTIFY, nmh.hdr.idFrom, (LPARAM) &nmh) == 0 ) {
662 if( !prop->SetValue(hWnd) ) {
663 ::MessageBeep((UINT)-1);
664 return 0;
665 }
666 // Let owner know
667 nmh.hdr.code = PIN_ITEMCHANGED;
668 ::SendMessage(GetParent(), WM_NOTIFY, nmh.hdr.idFrom, (LPARAM) &nmh);
669 // Repaint item
670 _InvalidateItem(m_iInplaceIndex);
671 // Destroy in-place control...
672 _DestroyInplaceWindow();
673 }
674 return 0;
675 }
676
677 LRESULT OnCancelProperty(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/)
678 {

Callers

nothing calls this directly

Calls 4

GetItemDataFunction · 0.70
_InvalidateItemFunction · 0.70
_DestroyInplaceWindowFunction · 0.70
SetValueMethod · 0.45

Tested by

no test coverage detected