Click here to Skip to main content
15,907,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: double buffering issue... Pin
Matthew Faithfull17-Jun-07 2:38
Matthew Faithfull17-Jun-07 2:38 
AnswerRe: double buffering issue... [modified] Pin
Mark Salsbery17-Jun-07 15:43
Mark Salsbery17-Jun-07 15:43 
GeneralRe: double buffering issue... Pin
eli1502197917-Jun-07 23:11
eli1502197917-Jun-07 23:11 
GeneralRe: double buffering issue... Pin
eli1502197918-Jun-07 23:09
eli1502197918-Jun-07 23:09 
GeneralRe: double buffering issue... Pin
Mark Salsbery19-Jun-07 6:21
Mark Salsbery19-Jun-07 6:21 
GeneralRe: double buffering issue... Pin
eli1502197919-Jun-07 19:07
eli1502197919-Jun-07 19:07 
GeneralRe: double buffering issue... Pin
Mark Salsbery19-Jun-07 20:11
Mark Salsbery19-Jun-07 20:11 
GeneralRe: double buffering issue... Pin
eli1502197920-Jun-07 1:05
eli1502197920-Jun-07 1:05 
Hi Mark,

Thanks for your patienceBig Grin | :-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 = uiCurrentRow ; uiIndex < m_LastErrorsCounter ; uiIndex++)
		{
			m_FailureList.DeleteItem(uiIndex);
		}
	}
	m_FailureList.SetRedraw(TRUE);
	m_LastErrorsCounter = uiCurrentRow; 
}


Anyway - thanks for your help,
I really appreciate it.

With best regards,
Eli
QuestionHow to change display properties of a computer through code? Pin
Sameer_Thakur17-Jun-07 0:18
Sameer_Thakur17-Jun-07 0:18 
AnswerRe: How to change display properties of a computer through code? Pin
Hans Ruck17-Jun-07 20:22
Hans Ruck17-Jun-07 20:22 
GeneralRe: How to change display properties of a computer through code? Pin
Sameer_Thakur18-Jun-07 1:09
Sameer_Thakur18-Jun-07 1:09 
Questionsend number to speaker Pin
SYS-MAN16-Jun-07 22:17
SYS-MAN16-Jun-07 22:17 
AnswerRe: send number to speaker Pin
azonenberg17-Jun-07 7:54
azonenberg17-Jun-07 7:54 
QuestionThreads and mutexes Pin
Cyrilix16-Jun-07 21:43
Cyrilix16-Jun-07 21:43 
AnswerRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 0:45
Matthew Faithfull17-Jun-07 0:45 
GeneralRe: Threads and mutexes Pin
Cyrilix17-Jun-07 7:02
Cyrilix17-Jun-07 7:02 
GeneralRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 10:11
Matthew Faithfull17-Jun-07 10:11 
GeneralRe: Threads and mutexes [modified] Pin
Cyrilix17-Jun-07 11:25
Cyrilix17-Jun-07 11:25 
GeneralRe: Threads and mutexes Pin
Bram van Kampen17-Jun-07 15:00
Bram van Kampen17-Jun-07 15:00 
GeneralRe: Threads and mutexes [modified] Pin
Cyrilix17-Jun-07 16:12
Cyrilix17-Jun-07 16:12 
GeneralRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 22:23
Matthew Faithfull17-Jun-07 22:23 
GeneralRe: Threads and mutexes Pin
Bram van Kampen18-Jun-07 13:30
Bram van Kampen18-Jun-07 13:30 
NewsAboubt Barcode printing, VC++ master-hand Come in and help me. Pin
h_boy200816-Jun-07 20:46
h_boy200816-Jun-07 20:46 
AnswerRe: Aboubt Barcode printing, VC++ master-hand Come in and help me. Pin
Matthew Faithfull17-Jun-07 0:38
Matthew Faithfull17-Jun-07 0:38 
GeneralRe: Aboubt Barcode printing, VC++ master-hand Come in and help me. Pin
Matthew Faithfull18-Jun-07 1:44
Matthew Faithfull18-Jun-07 1:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.