HexEdit/GridCtrl_src/GridCtrl.cpp
void CGridCtrl::OnEndInPlaceEdit(NMHDR* pNMHDR, LRESULT* pResult)
{
    GV_DISPINFO *pgvDispInfo = (GV_DISPINFO *)pNMHDR;
#if _MSC_VER >= 1300
    GV_ITEMW     *pgvItem = &pgvDispInfo->item;
#else
    GV_ITEM     *pgvItem = &pgvDispInfo->item;
#endif

    // In case OnEndInPlaceEdit called as window is being destroyed
    if (!IsWindow(GetSafeHwnd()))
        return;

    OnEndEditCell(pgvItem->row, pgvItem->col, pgvItem->strText);
    //InvalidateCellRect(CCellID(pgvItem->row, pgvItem->col));

    switch (pgvItem->lParam)
    {
    case VK_TAB:
    case VK_DOWN:
    case VK_UP:
    case VK_RIGHT:
    case VK_LEFT:
    case VK_NEXT:
    case VK_PRIOR:
    case VK_HOME:
    case VK_END:
        OnKeyDown(UINT(pgvItem->lParam), 0, 0);
        OnEditCell(m_idCurrentCell.row, m_idCurrentCell.col, CPoint( -1, -1), UINT(pgvItem->lParam));
    }

    *pResult = 0;
}
// Callback from any CInPlaceEdits that ended. This just calls OnEndEditCell,
// refreshes the edited cell and moves onto next cell if the return character
// from the edit says we should.

Callback from any CInPlaceEdits that ended. This just calls OnEndEditCell,
refreshes the edited cell and moves onto next cell if the return character
from the edit says we should.
Callback from any CInPlaceEdits that ended . This just calls OnEndEditCell refreshes the edited cell and moves onto next cell if the return character from the edit says we should .
void CGridCtrl::OnEndInPlaceEdit(NMHDR* pNMHDR, LRESULT* pResult)
{
    GV_DISPINFO *pgvDispInfo = (GV_DISPINFO *)pNMHDR;
#if _MSC_VER >= 1300
    GV_ITEMW     *pgvItem = &pgvDispInfo->item;
#else
    GV_ITEM     *pgvItem = &pgvDispInfo->item;
#endif
    if (!IsWindow(GetSafeHwnd()))
        return;
    OnEndEditCell(pgvItem->row, pgvItem->col, pgvItem->strText);
    switch (pgvItem->lParam)
    {
    case VK_TAB:
    case VK_DOWN:
    case VK_UP:
    case VK_RIGHT:
    case VK_LEFT:
    case VK_NEXT:
    case VK_PRIOR:
    case VK_HOME:
    case VK_END:
        OnKeyDown(UINT(pgvItem->lParam), 0, 0);
        OnEditCell(m_idCurrentCell.row, m_idCurrentCell.col, CPoint( -1, -1), UINT(pgvItem->lParam));
    }
    *pResult = 0;
}
void CGridCtrl :: OnEndInPlaceEdit ( NMHDR * pNMHDR , LRESULT * pResult ) { GV_DISPINFO * pgvDispInfo = ( GV_DISPINFO * ) pNMHDR ; #if _MSC_VER >= 1300 GV_ITEMW * pgvItem = & pgvDispInfo -> item ; #else GV_ITEM * pgvItem = & pgvDispInfo -> item ; #endif if ( ! IsWindow ( GetSafeHwnd ( ) ) ) return ; OnEndEditCell ( pgvItem -> row , pgvItem -> col , pgvItem -> strText ) ; switch ( pgvItem -> lParam ) { case VK_TAB : case VK_DOWN : case VK_UP : case VK_RIGHT : case VK_LEFT : case VK_NEXT : case VK_PRIOR : case VK_HOME : case VK_END : OnKeyDown ( UINT ( pgvItem -> lParam ) , 0 , 0 ) ; OnEditCell ( m_idCurrentCell . row , m_idCurrentCell . col , CPoint ( -1 , -1 ) , UINT ( pgvItem -> lParam ) ) ; } * pResult = 0 ; }
Callback from any CInPlaceEdits that ended.
Callback from any CInPlaceEdits that ended .
// In case OnEndInPlaceEdit called as window is being destroyed
 //InvalidateCellRect(CCellID(pgvItem->row, pgvItem->col));
