1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
void CGeneralTrafficView::WriteItem(CEvent& event)
{
// If it is the first trace (the windows is disabled), then
// display it
CWnd * pWnd = GetParent();
if (pWnd && !pWnd->IsWindowVisible())
{
pWnd->ShowWindow(SW_SHOWNORMAL);
}
// Set the date field of the new item
CString csDate;
csDate.Format("%s.%d",
event.m_ctTimeStamp.Format("%d/%m/%y %H:%M:%S"),
event.m_usTenthSeconds
);
int nItem = this->m_ListCtrl.InsertItem(csDate,
event.m_csDirection,
event.m_csImat,
event.m_csAppl,
event.m_csEventName,
event.m_csParameters,
event.m_csChannel,
event.m_csService,
event.m_csSap
);
this->m_ListCtrl.GiveHighlightNumber(nItem);
if(m_bOnlineUpdate)
{
this->m_ListCtrl.SetScrollPos(SB_VERT, 100, TRUE);
this->m_ListCtrl.EnsureVisible(this->m_ListCtrl.GetItemCount()-1, FALSE);
}
} |
Partager