HexEdit/GridCtrl_src/GridCtrl.cpp
void CGridCtrl::OnRButtonUp(UINT nFlags, CPoint point)
{
    CWnd::OnRButtonUp(nFlags, point);

	m_bRMouseButtonDown = FALSE;

    CCellID FocusCell;
    FocusCell = GetCellFromPt(point);

    EndEditing();        // Auto-destroy any InPlaceEdit's

    // If not a valid cell, pass -1 for row and column
    if(!IsValid(FocusCell))
        SendMessageToParent(-1, -1, NM_RCLICK);
    else
    {
        SetFocusCell(-1,-1);
        SetFocusCell(max(FocusCell.row, m_nFixedRows),
            max(FocusCell.col, m_nFixedCols));

        // tell the cell about it
        CGridCellBase* pCell = GetCell(FocusCell.row, FocusCell.col);
        if (pCell)
            pCell->OnRClick( GetPointClicked( FocusCell.row, FocusCell.col, point) );

        SendMessageToParent(FocusCell.row, FocusCell.col, NM_RCLICK);
    }
}
// EFW - Added to forward right click to parent so that a context
// menu can be shown without deriving a new grid class.

Added to forward right click to parent so that a context
menu can be shown without deriving a new grid class.
Added to forward right click to parent so that a context menu can be shown without deriving a new grid class .
void CGridCtrl::OnRButtonUp(UINT nFlags, CPoint point)
{
    CWnd::OnRButtonUp(nFlags, point);
	m_bRMouseButtonDown = FALSE;
    CCellID FocusCell;
    FocusCell = GetCellFromPt(point);
    EndEditing();        
    if(!IsValid(FocusCell))
        SendMessageToParent(-1, -1, NM_RCLICK);
    else
    {
        SetFocusCell(-1,-1);
        SetFocusCell(max(FocusCell.row, m_nFixedRows),
            max(FocusCell.col, m_nFixedCols));
        CGridCellBase* pCell = GetCell(FocusCell.row, FocusCell.col);
        if (pCell)
            pCell->OnRClick( GetPointClicked( FocusCell.row, FocusCell.col, point) );
        SendMessageToParent(FocusCell.row, FocusCell.col, NM_RCLICK);
    }
}
void CGridCtrl :: OnRButtonUp ( UINT nFlags , CPoint point ) { CWnd :: OnRButtonUp ( nFlags , point ) ; m_bRMouseButtonDown = FALSE ; CCellID FocusCell ; FocusCell = GetCellFromPt ( point ) ; EndEditing ( ) ; if ( ! IsValid ( FocusCell ) ) SendMessageToParent ( -1 , -1 , NM_RCLICK ) ; else { SetFocusCell ( -1 , -1 ) ; SetFocusCell ( max ( FocusCell . row , m_nFixedRows ) , max ( FocusCell . col , m_nFixedCols ) ) ; CGridCellBase * pCell = GetCell ( FocusCell . row , FocusCell . col ) ; if ( pCell ) pCell -> OnRClick ( GetPointClicked ( FocusCell . row , FocusCell . col , point ) ) ; SendMessageToParent ( FocusCell . row , FocusCell . col , NM_RCLICK ) ; } }
EFW - Added to forward right click to parent so that a context
menu can be shown without deriving a new grid class.
EFW - Added to forward right click to parent so that a context menu can be shown without deriving a new grid class .
// Auto-destroy any InPlaceEdit's
 // If not a valid cell, pass -1 for row and column
 // tell the cell about it
