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

Function _SpawnInplaceWindow

Libraries/PropertyGrid/PropertyTree.h:467–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465 }
466
467 BOOL _SpawnInplaceWindow(IProperty* prop, HTREEITEM hItem)
468 {
469 ATLASSERT(prop);
470 ATLASSERT(hItem);
471 // Destroy old editor
472 _DestroyInplaceWindow();
473 // Do we need an editor here?
474 if( hItem == NULL || hItem != GetSelectedItem() ) return FALSE;
475 if( !prop->IsEnabled() ) return FALSE;
476 // Create a new editor window
477 RECT rcValue = { 0 };
478 _GetInplaceRect(hItem, &rcValue);
479 ::InflateRect(&rcValue, 0, -1);
480 m_hwndInplace = prop->CreateInplaceControl(m_hWnd, rcValue);
481 if( m_hwndInplace != NULL ) {
482 // Activate the new editor window
483 ATLASSERT(::IsWindow(m_hwndInplace));
484 ::SetWindowPos(m_hwndInplace, HWND_TOP, 0,0,0,0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
485 m_iInplaceIndex = hItem;
486 }
487 return m_hwndInplace != NULL;
488 }
489
490 void _InvalidateItem(HTREEITEM hItem)
491 {

Callers 6

SetItemValueFunction · 0.70
OnSetFocusFunction · 0.70
OnKeyDownFunction · 0.70
OnCancelPropertyFunction · 0.70
OnChangedPropertyFunction · 0.70
OnSelChangedFunction · 0.70

Calls 4

_GetInplaceRectFunction · 0.85
IsEnabledMethod · 0.80
_DestroyInplaceWindowFunction · 0.70
CreateInplaceControlMethod · 0.45

Tested by

no test coverage detected