Hi Mark, Thanks for your patience:-D
Mark Salsbery wrote:
What parts flicker specifically? Is it the text on the background?
No,Only the background is flickering(and not allways). I don't know if this could help,but the following function is being called every time that the list needs to be updated(i.e every 250msec).
void Frm_WKFailureList::UpdateList(iGendevBit::BitMatrixResultListType &p_FailuresListRef)
{
iGendevBit::BitMatrixResultClass *CurrentElement;
dDbsrvNotif::notificationTextType NotifText;
COLORREF SeverityColor;
UINT uiCurrentRow = 0;
UINT uiCurrentErrorsCounter = 0;
m\_FailureList.SetRedraw(FALSE);
// Adjust the list's last column according to
// the right scroll bar existent
if (p\_FailuresListRef.GetElementNum() > MAX\_VISIBLE\_ITEM\_WITH\_NO\_SCROLL)
{
m\_FailureList.SetColumnWidth(2 , 30);
}
else
{
m\_FailureList.SetColumnWidth(2 , 48);
}
uiCurrentErrorsCounter = p\_FailuresListRef.GetElementNum();
p\_FailuresListRef.ScanInit(bTypesCnt::FROM\_TAIL);
while ((CurrentElement = p\_FailuresListRef.ScanNext()) != NULL)
{
// Get failure severity
switch(CurrentElement->m\_Severity)
{
case iGendevBit::SLIGHT:
// in the future - do not show "Slight" severity in the list.
// For now - show with with background
SeverityColor = RGB(255 , 255 , 0);
break;
case iGendevBit::MEDIUM:
SeverityColor = RGB(255 , 255 , 0);
break;
case iGendevBit::SEVERE:
SeverityColor = RGB(255 , 0 , 0);
break;
}
// Get failure text
dDbsrvNotif::GetNotifText(NotifText , CurrentElement->m\_NotiffId);
CString szError , szTime;
szError = NotifText;
szTime = CurrentElement->m\_FailureTime.GetFormattedTod(bTimeTod::HH\_MM\_SS);
if (m\_FailureList.GetItemCount() < (uiCurrentRow + 1))
{
m\_FailureList.InsertItem(uiCurrentRow , \_T(""));
}
static int x = 0;
szTime.Format(\_T("%d") , x++);
m\_FailureList.SetItemText(uiCurrentRow , 0 , szTime);
m\_FailureList.SetItemText(uiCurrentRow , 1 , szError);
// Get failure check list existents
CHECK\_LIST\_ENUM IsCheckListExist = NO\_CHECK\_LIST;
SetLineBkColorAndIcon(uiCurrentRow , SeverityColor , IsCheckListExist); // Set the icon and background color for the current row
uiCurrentRow++;
m\_bListIsEmpty = FALSE;
}
if (uiCurrentRow < m\_LastErrorsCounter)
{
for (UINT uiIndex = uiCur