示例#1
0
void CResiduePane::OnSelectionChanged(NMHDR* pNMHDR, LRESULT* pResult)
{;
	NM_GRIDVIEW * pnmgv = (NM_GRIDVIEW *)pNMHDR;
	if (pnmgv!=NULL && m_residueGridCtrl !=NULL && m_residueGridCtrl->GetSelectedCount() > 0 )
	{
		if ( pnmgv->iRow >= 0 && pnmgv->iColumn >= 0 )	
		{
			 CGridCellBase* grid = m_residueGridCtrl->GetCell(pnmgv->iRow,pnmgv->iColumn);
			if(grid==NULL)
				return;
			m_pProteinVistaRenderer->m_pLastPickObjectInst = (CProteinObjectInst*)grid->GetData();
		}else
		{
		
			CCellRange	range = m_residueGridCtrl->GetSelectedCellRange();
			int row = range.GetMinRow();
			int col = range.GetMinCol();

			if ( row >= 0 && col >= 0 )
			{
				m_pProteinVistaRenderer->m_pLastPickObjectInst = (CProteinObjectInst*)m_residueGridCtrl->GetCell(row,col)->GetData();
				//m_pProteinVistaRenderer->m_pLastPickObjectInst->
			}
		}
		m_bSelectionChanged = TRUE;
	}
}
示例#2
0
void CGridCellBase::operator=(const CGridCellBase& cell)
{
    SetGrid(cell.GetGrid());    // do first in case of dependencies

    SetText(cell.GetText());
    SetImage(cell.GetImage());
    SetData(cell.GetData());
    SetState(cell.GetState());
    SetFormat(cell.GetFormat());
    SetTextClr(cell.GetTextClr());
    SetBackClr(cell.GetBackClr());
    SetFont(cell.IsDefaultFont()? NULL : cell.GetFont());
    SetMargin(cell.GetMargin());
}
void CGridCellBase::operator=(  CGridCellBase& cell)
{
	if (this == &cell) return;

    SetGrid(cell.GetGrid());    // do first in case of dependencies

    SetText(cell.GetText());
    SetImage(cell.GetImage());
    SetData(cell.GetData());
    SetState(cell.GetState());
    SetFormat(cell.GetFormat());
    SetTextClr(cell.GetTextClr());
    SetBackClr(cell.GetBackClr());
    SetFont(cell.IsDefaultFont()? NULL : cell.GetFont());
    SetMargin(cell.GetMargin());
//Used for merge cells
//by Huang Wei
	SetMergeCellID(cell.GetMergeCellID());
	SetMergeRange(cell.GetMergeRange());
	Show(cell.IsShow());
}